简体   繁体   English

Bootstrap下拉按钮高度不同

[英]Bootstrap dropdown button heights different

here is my html: 这是我的HTML:

<div class="row-fluid">
  <div class="span3">
     <div class="btn-group">
         <a class="btn btn-primary" href="#"><i class="icon-user"></i> User</a>
         <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#">
         <span class="icon-caret-down"></span>
         </a>
         <ul class="dropdown-menu">
         <li><a href="#"><i class="icon-fixed-width icon-pencil"></i> Edit</a></li>
         <li><a href="#"><i class="icon-fixed-width icon-trash"></i> Delete</a></li>
         <li><a href="#"><i class="icon-fixed-width icon-ban-circle"></i> Ban</a></li>
         <li class="divider"></li>
         <li><a href="#"><i class="i"></i> Make admin</a></li>
         </ul>
      </div>
   </div>
</div>

This is a simple example from: http://fortawesome.github.io/Font-Awesome/examples/ 这是一个简单的例子: http//fortawesome.github.io/Font-Awesome/examples/

And in my browser chrome, the output is: 在我的浏览器chrome中,输出是:

I use FontAwesome, and i want just try the icons. 我使用FontAwesome,我只想尝试图标。 Pls help, thank you :) 请帮忙,谢谢:)

Try adding <!DOCTYPE html> to the beginning of your HTML file. 尝试将<!DOCTYPE html>添加到HTML文件的开头。

According to the docs : 根据文件

Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Bootstrap使用某些需要使用HTML5 doctype的HTML元素和CSS属性。 Include it at the beginning of all your projects. 在所有项目的开头包含它。

So wrap your Bootstrap HTML files in the following: 因此,请将您的Bootstrap HTML文件包装在以下内容中:

<!DOCTYPE html>
<html lang="en">
  ...
</html>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM