简单教程
提交运行
代码编辑器:
<!DOCTYPE html> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.bootcss.com/foundation/5.5.3/css/foundation.min.css"> <div style="padding:20px;"> <h2>垂直按钮组</h2> <p>垂直按钮组使用 .stack 类来创建。注意,按钮会跨越父元素的整个宽度。</p> <ul class="button-group stack"> <li><button type="button" class="button">Apple</button></li> <li><button type="button" class="button">Samsung</button></li> <li><button type="button" class="button">Sony</button></li> </ul> </div> <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/foundation/5.5.3/js/foundation.min.js"></script> <script src="https://cdn.bootcss.com/foundation/5.5.3/js/vendor/what-input.js"></script> <script> $(document).foundation(); </script>
运行结果: