我有一个稍微修改的Bootstrap下拉列表来截断按钮元素内的文本,但是,在计算按钮元素的高度方面似乎存在差异。IE10和Chrome之间的区别计算行内块元素的高度
This fiddle demonstrates what I did initially该键似乎是控制按钮内的span元素的CSS。
button.btn span {
min-width:91px;
max-width:91px;
overflow:hidden;
white-space:nowrap;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
display:inline-block;
}
下面是IE浏览器度量和铬为按钮元件的高度:
与浮子跨度更换直列块样式:左as demonstrated in this fiddle似乎改正了这两个浏览器的高度和作品。
button.btn span {
min-width:91px;
max-width:91px;
overflow:hidden;
white-space:nowrap;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
float: left;
}
什么是使用内联块并且被正确地这样做时引起Chrome和IE之间元件的高度差?
更新:Firefox似乎与IE在这里做同样的事情。
float将元素向左或向右的方向移动,display-block dnt强制它仅在内联时不强制元素的方向... – SaurabhLP 2013-05-14 09:54:49