简体   繁体   English

Chrome中图像悬停时出现Stange问​​题

[英]Stange issue with image hover in Chrome

I have an html/css site that uses an effect to magnify images when you hover over them. 我有一个html / css网站,当您将鼠标悬停在图片上时,该网站会使用效果放大图片。 It works fine, but when using Chrome, it causes the images to jitter and resize on page load. 它工作正常,但使用Chrome时,会导致图像抖动并在页面加载时调整大小。 It doesn't seem to do this in other browsers, and doesn't do it in the Dreamweaver browser test, either. 在其他浏览器中似乎没有执行此操作,在Dreamweaver浏览器测试中也没有执行此操作。 If I remove the effect the page loads fine. 如果我删除效果,页面加载正常。 Any ideas what could cause this? 有什么想法会导致这种情况吗?

Here's a link to the page: http://carissalyn.com/Landing.html 这是页面的链接: http : //carissalyn.com/Landing.html

Here is the html for the images: 这是图像的html:

<tr>
<td><a href="" class="imghover"><img src="images/leaf.jpg" alt="portrait" class="border"></a></td>
<td><a href="" class="imghover"><img src="images/DSC_2280-Edit-Edit-Final.jpg"  alt="portrait" class="border"></a></td>
<td><a href="" class="imghover"><img src="images/DSC_2685.jpg" alt="blog" class="border"></a></td>
</tr>

and here is the css for the hover: 这是悬停的CSS:

.imghover img{
-webkit-transition-duration: 1s; 
-moz-transition-duration: 1s; 
-o-transition-duration: 1s; 
}
.imghover img:hover{
-webkit-transform:scale(1.1);
-moz-transform:scale(1.1); 
-o-transform:scale(1.1); 
}

I was having a similar issue. 我有一个类似的问题。 Found a fix on this site. 站点上找到修复程序。 It's sort of hackish but seems to work. 这有点hackus,但似乎可以工作。 The key is to add a tiny bit of rotation along with the zoom. 关键是在缩放的同时增加一点旋转。

.imghover img:hover {
    transform: scale(2) rotate(0.1deg);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM