Bootstrap按钮组简单实现代码

<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE-edge"> <meta content="width=device-width,initial-scale=1"> <title>Bootstrap 101 Template</title> <link href="https://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap-theme.min.css"> <link href="https://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap.min.css"> </head> <body> <!-- 按钮组 --> <div> <button type="button">left</button> <button type="button">center</button> <button type="button">right</button> </div> <hr> <!-- 按钮组,垂直 --> <div> <button type="button">left</button> <button type="button">center</button> <button type="button">right</button> </div> <hr/> <!-- 按钮组嵌套下拉菜单 --> <div> <button type="button">left</button> <button type="button">center</button> <button type="button">right</button> <div> <button type="button" data-toggle="dropdown"> Dropdown<span></span></button> <ul role="menu" aria-labelledby="dropdownMenu1"> <li role="presentation">Dropdown header</li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#" >Action</a></li> <li role="presentation"></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="#" >Another action</a></li> </ul> </div> </div> <br/> <br/> <br/> <br/> <br/> <!-- 按钮组的组 --> <div role="toolbar"> <div> <button type="button">left</button> <button type="button">center</button> <button type="button">right</button> </div> <hr/> <div> <button type="button">left</button> <button type="button">center</button> <button type="button">right</button> </div> <hr/> <div> <button type="button">left</button> <button type="button">center</button> <button type="button">right</button> </div> <hr/> <div> <button type="button">left</button> <button type="button">center</button> <button type="button">right</button> </div> <br/> </div> <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.3.1/js/npm.js"></script> </body> </html>

效果图:

Bootstrap按钮组简单实现代码

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwzyds.html