gpt4 book ai didi

CSS 关键帧动画在本地工作,但不在我的网站上

转载 作者:太空宇宙 更新时间:2023-11-04 13:27:37 25 4
gpt4 key购买 nike

我在安装 Wordpress 时使用了以下代码,它在我的实时站点上不起作用,但在本地 mamp 上运行良好。所有 Assets 都在浏览器中正确显示。它只是不工作。我希望有人知道我的代码可能有什么问题。

有什么可以干扰 CSS 关键帧动画的吗?

@keyframes animatedBackground {
from { background-position: -405 0; }/*1048+ - Default Styles*/
to { background-position: 1090 0; }/*1048+ - Default Styles*/
}
@-webkit-keyframes animatedBackground /* Safari and Chrome */
{
from { background-position: -405 0; }/*1048+ - Default Styles*/
to { background-position: 1090 0; }/*1048+ - Default Styles*/
}
.animation {
-webkit-animation-name: animatedBackground;
-webkit-animation-timing-function: linear;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: normal;
-webkit-animation-duration: 12s;
-webkit-animation-play-state: running;
animation-name: animatedBackground;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: normal;
animation-duration: 12s;
animation-play-state: running;
}

最佳答案

背景位置缺少px

@keyframes animatedBackground {
from { background-position: -405px 0; }/*1048+ - Default Styles*/
to { background-position: 1090px 0; }/*1048+ - Default Styles*/
}
@-webkit-keyframes animatedBackground /* Safari and Chrome */
{
from { background-position: -405px 0; }/*1048+ - Default Styles*/
to { background-position: 1090px 0; }/*1048+ - Default Styles*/
}

希望您正在 Chrome 中测试该页面。

关于CSS 关键帧动画在本地工作,但不在我的网站上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23610152/

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