我如何只在 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/