gpt4 book ai didi

jquery - 图像过渡不适用于以jquery为中心的图像

转载 作者:行者123 更新时间:2023-11-28 09:21:40 27 4
gpt4 key购买 nike

对于脚本的图像过渡,我有一个问题。

这是我的DEMO页面

在此演示中,您可以看到将鼠标悬停在图像过渡效果上。它可以在Chrome,Mozilla firefox上运行,但不能在Safari浏览器上运行。

我正在使用此CSS代码进行图像转换:

.abo_im img {
width:100%;
-webkit-transition: all 1s ease; /* Safari and Chrome */
-moz-transition: all 1s ease; /* Firefox */
-o-transition: all 1s ease; /* IE 9 */
-ms-transition: all 1s ease; /* Opera */
transition: all 1s ease;
}
.abo_im:hover img {
-webkit-transform:scale(1.25); /* Safari and Chrome */
-moz-transform:scale(1.25); /* Firefox */
-ms-transform:scale(1.25); /* IE 9 */
-o-transform:scale(1.25); /* Opera */
transform:scale(1.25);
}


此代码可用于过渡,但如果您检查它的safari浏览器,则会看到图像居中不起作用。

如果我删除此行:

-webkit-transition: all 1s ease; /* Safari and Chrome */
-moz-transition: all 1s ease; /* Firefox */
-o-transition: all 1s ease; /* IE 9 */
-ms-transition: all 1s ease; /* Opera */
transition: all 1s ease;


来自 .abo_im img {}

以图像为中心的工作。有人能帮我一下吗 ?

最佳答案

我找到了解决方案
我改变了这个:

-webkit-transition: all 1s ease; /* Safari and Chrome */
-moz-transition: all 1s ease; /* Firefox */
-o-transition: all 1s ease; /* IE 9 */
-ms-transition: all 1s ease; /* Opera */
transition: all 1s ease;

对此
-webkit-transition: -webkit-transform 0.5s ease;
-moz-transition: -moz-transform 0.5s ease;
transition: transform 0.5s ease;

现在我的问题已解决。

关于jquery - 图像过渡不适用于以jquery为中心的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26073582/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com