<nav>
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
HTML <nav>元素表示页面的一部分,其目的是在当前文档或其他文档中提供导航链接。导航部分的常见示例是菜单,目录和索引。
尝试一下
<nav class="crumbs"> <ol> <li class="crumb"><a href="#">Bikes</a></li> <li class="crumb"><a href="#">BMX</a></li> <li class="crumb">Jump Bike 3000</li> </ol> </nav> <h1>Jump Bike 3000</h1> <p> This BMX bike is a solid step into the pro world. It looks as legit as it rides and is built to polish your skills. </p> nav { border-bottom: 1px solid black; } .crumbs ol { list-style-type: none; padding-left: 0; } .crumb { display: inline-block; } .crumb a::after { display: inline-block; color: #000; content: ">"; font-size: 80%; font-weight: bold; padding: 0 3px; } 属性
这个元素只包含全局属性.
使用说明
示例
xml
<nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </nav> 规范
| Specification |
|---|
| HTML> # the-nav-element> |