gpt4 book ai didi

jquery - 如何在网页加载时从右向左滚动图像?

转载 作者:行者123 更新时间:2023-11-28 17:26:53 25 4
gpt4 key购买 nike

如何将这张图片从右向左滚动?

img{
position:absolute;
top:50px;
right:5px;
width:100px;
height:100px;
border-radius:50%;
background:#ff00ff;

}
<img src="http://cdn.wallpapersafari.com/15/28/zMTLik.jpg" style="height:100px; width:100px;"/>

最佳答案

在 CSS3 @keyframes 规则中检查此片段

img{
position:absolute;
top:50px;
right:80%;
width:100px;
height:100px;
border-radius:50%;
transition-duration:1s;
animation:animate 3s;
}

@keyframes animate{
from{
transform:rotate(0deg);
}
to{
transform:rotate(-500deg);
}
from{
right:5px;
}
to{
right:80%;
}
}
<img src="http://cdn.wallpapersafari.com/15/28/zMTLik.jpg" style="height:100px; width:100px;"/>

关于jquery - 如何在网页加载时从右向左滚动图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39371168/

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