gpt4 book ai didi

css - 在 Chrome 中使用转换抽动进行转换

转载 作者:行者123 更新时间:2023-12-02 04:45:54 25 4
gpt4 key购买 nike

我有下一个代码:JSFiddle

<div class="wrap">
<div class="item">
<div class="image" style="background-image: url(http://loremflickr.com/800/800)"></div>
</div>
</div>
<style>
.wrap {
width: 500px;
}

.item {
overflow: hidden;
padding-bottom: 100%;
position: relative;
}

.image {
backround-size: cover;
background-position: center center;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;

transition: all .4s ease;
}

.item:hover .image {
transform: scale(1.1)
}
</style>

如果你将鼠标放在照片上,然后离开,然后放下,然后再次离开,速度不是很快(等待过渡完成),有时图像会抽动。看起来 transition 有时不起作用。

有谁知道,这是什么问题?

最佳答案

您的代码中有语法错误:

backround-size: cover;
----^

这会导致定位抽搐

关于css - 在 Chrome 中使用转换抽动进行转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33043061/

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