Split Buttons
优质
小牛编辑
126浏览
2023-12-01
描述 (Description)
要创建拆分按钮,必须添加.arrow-only类并创建两个按钮的按钮组。 您必须使用.show-for-sr为屏幕阅读器使用标签。
例子 (Example)
以下示例演示如何在Foundation中使用split buttons 。
<html>
<head>
<title>Split Buttons</title>
<link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
<link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css">
</head>
<body>
<div class = "button-group">
<a class = "button">Shut Down</a>
<a class = "dropdown button arrow-only"><span class = "show-for-sr">Show options</span></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>