gpt4 book ai didi

html - 仅在 id 内应用 "webkit-keyframes"

转载 作者:太空宇宙 更新时间:2023-11-04 12:10:46 26 4
gpt4 key购买 nike

我如何只在 id #progress1 中应用“webkit-keyframes”?我想这样做是因为页面中将有另一个进度条 (#progress2),其中包含不同的 webkit 关键帧。

#progress1 {
background: white; /*-- Color of the bar --*/
height: 30px;
width: 0%;
max-width: 100%;
float: left;
-webkit-animation: progress 2s 1 forwards;
-moz-animation: progress 2s 1 forwards;
-ms-animation: progress 2s 1 forwards;
animation: progress 2s 1 forwards;
}



@-webkit-keyframes progress {
from { }

to { width: 36% }
}

最佳答案

不可能在 CSS 中限定动画范围。只是给他们不同的名字。不要将它们都称为 progress

关于html - 仅在 id 内应用 "webkit-keyframes",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29064598/

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