使用 Bootstrap 向上设置下拉菜单
在 Bootstrap 中使用 .dropup 类来设置一个向上的下拉菜单。
你可以尝试运行以下代码来实现 .dropup 类 −
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <div class = "container"> <h2>Mobile Phones</h2> <p>The following are the mobile phone brands available in India:</p> <div class="dropup"> <button class = "btn btn-default dropdown-toggle" type = "button" data-toggle="dropdown">Companies <span class = "caret"></span></button> <ul class = "dropdown-menu"> <li><a href = "#">Apple</a></li> <li><a href = "#">Samsung</a></li> <li><a href = "#">Oppo</a></li> <li><a href = "#">Nokia</a></li> </ul> </div> </div> </body> </html>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP