使用Bootstrap中的.caret类创建代表下拉按钮的插入符箭头图标。
您可以尝试运行以下代码来创建一个菱形箭头图标-
<!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>Brands</h2> <p>The car brands:</p> <div class = "btn-group"> <button type = "button" class = "btn dropdown-toggle" data-toggle = "dropdown">Car <span class="caret"></span></button> <ul class = "dropdown-menu" role = "menu"> <li><a href = "#">BMW</a></li> <li><a href = "#">Toyota</a></li> <li><a href = "#">Audi</a></li> <li><a href = "#">Mahindra</a></li> <li><a href = "#">Volvo</a></li> </ul> </div> </div> </body> </html>