我的图像在Chrome和Firefox中看起来显示不同。为什么Firefox和Chrome显示不同的图像?
这里是一个小提琴http://jsfiddle.net/SEOplay/4FGad/2/在firefox和chrome中打开它,你会看到图像的尺寸是不同的。
Chrome根据需要显示图像。
HTML
<div id="imageContent">
<div id="bigImgCon">
<a href="<?php echo $firstImg; ?>" rel="lightbox"><img id="firstImage" rel="lightbox" src="http://placekitten.com/200/400" /></a>
</div>
</div>
CSS
div#imageContent {
width:100%;
text-align:center;
margin:0 auto;
}
div#bigImgCon {
width:100%;
max-height:300px;
overflow:hidden;
position:relative;
margin-top:10px;
background-color:red;
}
img#firstImage {
max-width:100%;
max-height:100%;
cursor:hand;
cursor:pointer;
display:inline-block;
}
这将是很棒的一些截图的差异。 – Vallentin
@Vallentin点击提供的jsfiddle链接,在Chrome中打开它,然后在Firefox中打开它。 – Matt
@Matt一个好的,独立的SO问题将包括屏幕截图。 – admdrew