我有一个带有图像的锚标记和悬停时出现的绝对位置范围标记。问题是当锚标记悬停并显示跨度时,锚标记中的图像会在Google Chrome中略微移动。所有其他浏览器都可以正常工作。
HTML是:
<a href="{{link}}">
<span></span>
<img src="{{image}}" />
</a>
CSS是:
#instafeed a {
width: 33.33333333333333%;
float: left;
position: relative;
}
#instafeed a > span {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
opacity: 0;
color: #FFF;
text-align: center;
background: rgba(0, 0, 0, 0.7);
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
#instafeed a:hover > span {
opacity: 1;
}
如何阻止图片在Chrome中移动/调整大小?
您可以在此处查看问题:http://dev.aaronpitts.ch/cj/(左侧的照片)。
非常感谢