甚至宽度组(Even width Group)
优质
小牛编辑
128浏览
2023-12-01
描述 (Description)
.expanded类可用于自动将按钮显示为全宽。 根据按钮的数量,它们可以扩展到全宽; 最多可以扩展六个按钮。
例子 (Example)
以下示例演示如何在Foundation中使用even width button group 。
<html>
<head>
<title>Even-width Group</title>
<link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
</head>
<body>
<div class = "expanded button-group">
<a class = "button">One</a>
<a class = "button">Two</a>
<a class = "button">Three</a>
<a class = "button">Four</a>
<a class = "button">Five</a>
<a class = "button">Six</a>
</div>
<div class = "expanded button-group">
<a class = "button">One</a>
<a class = "button">Two</a>
<a class = "button">Three</a>
<a class = "button">Four</a>
<a class = "button">Five</a>
<a class = "button">Six</a>
<a class = "button">Seven</a>
</div>
<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>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>