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">select</button> <button type="button" data-toggle="dropdown"> <span></span> <span>Toggle Dropdown</span> &nbsp;</button> <ul role="menu"> <li><a href="#" >Action</a></li> </div> <br/> <br/> <br/> <br/> <!-- 上拉式 --> <div> <button type="button">select</button> <button type="button" data-toggle="dropdown"> <span></span> <span>Toggle Dropdown</span> &nbsp;</button> <ul role="menu"> <li><a href="#" >Action</a></li> </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/wwzydp.html