Twitter引导程序:带图标但没有文本的按钮高度错误 [英] Twitter bootstrap: Wrong heigth of button with icon and without text

查看:66
本文介绍了Twitter引导程序:带图标但没有文本的按钮高度错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单html页面上有两个按钮,带有附加的twitter-bootstrap 2/3:带和不带文本.如果我打开它,则没有文字的按钮的错误较小的高度(请参见下面的屏幕截图).

There are two buttons on simple html page with attached twitter-bootstrap 2/3: with and without text. If I open it, button without text has wrong smaller height (See screenshot below).

怎么回事?在IE 9 \ 10中重复同样的情况.但是,如果在 jsfiddle 中运行,一切都很好.即使我通过开发人员工具栏在互联网上具有TB的某个页面中手动添加按钮也没关系.

How comes it? Same situation repeats in IE 9\10. But if run in jsfiddle, all is fine. Even if i add a button in manualy via developer toolbar in some page with TB in internet all is ok.

P.S .:与Bootstrap 2相同...

P.S.: same thing with bootstrap 2...

<html>
<head>
  <link rel="stylesheet" type="text/css" href="http//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
</head>
<body>
<a class="btn btn-danger" href="#"><span class="glyphicon glyphicon-trash"></span> Delete</a>
<a class="btn btn-primary" href="#"><span class="glyphicon glyphicon-pencil"></span></a>
</body>
</html>

我在做什么错了?

推荐答案

原因是<!DOCTYPE html>" 第一个字符串.必须在html 5上面将其设置为writter.如果它不存在或具有html 4描述("PUBLIC等"),则会发生此错误.

The cause is "<!DOCTYPE html>" first string. It must be set as writter above for html 5. If it doesn't exists or it has html 4 description ("PUBLIC etc") this error occurs.

这篇关于Twitter引导程序:带图标但没有文本的按钮高度错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆