1

我正在使用 twiiter bootstrap 生成可折叠菜单,但在验证此代码时出现错误:

<div class="nav-collapse">
  <ul class="nav pull-right">
    <li><a href="/">Home</a></li>
    <li><a href="/outfits">Outfits</a></li>
    <li><a href="/champions">Champiopns</a></li>
    <li><a href="/news">News</a></li>
    <li><a href="/contact">Contact</a></li>
    <li>
      <a href="/users/sign_in">Login</a>  
    </li>
  </ul>
</div>

这是错误:

 Line 73, Column 12: Element li not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
        <li><a href="/">Home</a></li>
Contexts in which element li may be used:
Inside ol elements.
Inside ul elements.
Inside menu elements.
Content model for element div:
Flow content.

我不明白,在我看来 li 元素被正确地包裹在一个 ul ...

如何使此代码验证?

4

0 回答 0