Drilldown Menu
优质
小牛编辑
130浏览
2023-12-01
描述 (Description)
“向下钻取”菜单是一种标准菜单语法,可将嵌套列表更改为垂直向下钻取菜单。
例子 (Example)
以下示例演示了在Foundation中使用drilldown menu -
<!doctype html>
<head>
<meta charset = "utf-8" />
<meta http-equiv = "x-ua-compatible" content = "ie = edge" />
<meta name = "viewport" content = "width = device-width, initial-scale = 1.0" />
<title>Drilldown Menu</title>
<link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
<script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
</head>
<body>
<h2>Drilldown Menu Example</h2>
<ul class = "vertical menu" data-drilldown style = "width: 200px">
<li>
<a href = "#">Cars</a>
<ul class = "vertical menu">
<li>
<a href = "#">Mahindra</a>
<ul class = "vertical menu">
<li><a href = "#">Xylo</a></li>
<li><a href = "#">Scorpio</a></li>
<li><a href = "#">Bolero</a></li>
<li><a href = "#">Quanto</a></li>
</ul>
</li>
<li><a href = "#">Ford</a></li>
<li><a href = "#">Skoda</a></li>
<li><a href = "#">Toyota</a></li>
<li><a href = "#">Renualt</a></li>
</ul>
</li>
<li>
<a href = "#">Sports</a>
<ul class = "vertical menu">
<li><a href = "#">Cricket</a></li>
<li><a href = "#">Football</a></li>
<li><a href = "#">Baseball</a></li>
<li><a href = "#">Hockey</a></li>
</ul>
</li>
<li>
<a href = "#">Country</a>
<ul class = "vertical menu">
<li><a href = "#">India</a></li>
<li><a href = "#">Srilanka</a></li>
<li><a href = "#">Australia</a></li>
<li><a href = "#">England</a></li>
</ul>
</li>
</ul>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>