[英]IE 8 compatibility mode
我有以下问题:
我的 css 如下:
.SPImage img
{
margin-top:-15px;
float:left;
white-space:normal;
width:194px;
height:149px;
}
我的 HTML 如下:
<DIV id=SPImage class=SPImage>
<DIV style="POSITION: relative; WIDTH: 100%">
<IMG style="WIDTH: 165px; MARGIN-LEFT: 15px" title="test" alt="test" src="/resources/2710004.jpg">
</DIV>
</DIV>
我在 HTML 头标签中有以下设置:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
我的问题是,当我使用 IE 8 时,由于margin-top:-15px;
在兼容性中使用 IE 7 和 IE8 时,它看起来还不错。 我无法删除margin-top:-15px;
因为它在 IE 7 中看起来很难看。
我该如何解决这个问题?
当我这样做时:
CSS:
.SPImage img {
margin-top:-15px;
float:left;
white-space:normal;
width:194px;
height:149px;
}
HTML:
<DIV id="SPImage" class="SPImage">
<IMG style="WIDTH: 165px; MARGIN-LEFT: 15px" title="test" alt="test" src="img url">
</DIV>
在 IE 7、IE 8、IE9、Chrome 和 FF 中看起来一样吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.