我有一个奇怪的格式问题,也许有人可以帮助我。在Chrome和Safari拉这件事(我在Mac)CSS格式化Chrome与Safari
http://plnkr.co/edit/nzTsbKjAgmLo7cJOwzEu?p=preview
铬看起来不错:
Safari浏览器看起来很奇怪(插入符号是位于顶部):
野生动物园似乎是奇怪的一个。 Firefox和IE看起来像Chrome。
代码是相对简单的(我认为)
HTML:
<html>
<head>
<link data-require="[email protected]*" data-semver="3.2.0" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class=" btn-primary">
<span class="title">
test
</span>
<span class="caret"></span>
</div>
</body>
</html>
CSS:
div.btn-primary {
height: 40px ;
padding: 0px ;
line-height: 40px ;
}
span.title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
span.caret {
height: 100%;
}
你有没有试图改变你的'垂直align'为'bottom'? – rnevius 2014-09-27 06:38:33