我正在建设一个网站使用Twitter引导和所有浏览器,除了IE显示我的标志以上的div“品牌”类。它的格式是PNG。
<div class="container text-center">
<img class="img-responsive brand-img" src="img/logo.png" alt="">
<div class="brand">MG STAV</div>
<div class="address-bar"> stavební, spol. s.r.o.</div>
</divCSS
.brand-img{
display: inline;
text-align: center;
margin-top: 20px;
margin-bottom: 10px;
}我需要使它的工作,即使与IE,但我不能提供一个解决方案。
发布于 2015-02-02 00:30:50
我认为问题是,“.品牌形象”div被赋予"display:inline“。如果没有看到实际的实时代码,很难说,但我认为IE正在呈现图像,但给出了div,它在0 0px的高度。
尝试将css更改为内联块。这将保持图像的位置与其他“非块”水平元素一致,并让它仍然保持它的自然高度。
CSS:
.brand-img{
display: inline-block;
text-align: center;
margin-top: 20px;
margin-bottom: 10px;
}https://stackoverflow.com/questions/28269508
复制相似问题