首页 > 解决方案 > 在页面浏览器中添加自定义 css 后,在更新该页面后更改整个 css

问题描述

我在 WordPress 网站上为按钮编写了这个 CSS。但是更新后我看到按钮有一个新的动画,我没有写任何CSS。然后我检查了一下,发现有新keyframe添加的。

我写的CSS-

a.eael-creative-button.eael-creative-button--ujarak {
    animation: pulse infinite 2s;
}


@keyframes pulse {
    0% {
    box-shadow: 0 0 0 0 rgb(253 253 253 / 70%);
}

70% {
    box-shadow: 0 0 0 20px rgb(255 232 0 / 0%);
}

100% {
    box-shadow: 0 0 0 0 rgb(255 232 0 / 0%);
}

}

更新我在检查模式下找到的 css 后-

 a.eael-creative-button.eael-creative-button--ujarak {
        animation: pulse infinite 2s;
    }

    @keyframes pulse {
        0%, 100% {
    transform: scale3d(1,1,1);
    }

    50% {
    transform: scale3d(1.05,1.05,1.05);
    }

更新页面后,此处Keyframes自动更改。为什么会这样?请问有人知道解决方法吗?

标签: htmlcss

解决方案


您与 WordPress 网站中的一些现有 CSS 发生了冲突。不是自动添加了额外的 CSS 属性,而是已经pulse定义了动画。尝试称它为不同的东西。


推荐阅读