Why can't I animate custom properties (aka CSS variables)?
问题 See this animation: The golden div has an animation where a custom property is animated ( @keyframes roll-o-1 animates --o ). This animates in steps. The silver div has an animation where a normal property is animated ( @keyframes roll-o-2 animates left ). This animates continuously. Why doesn't the golden div animate smoothly? Is there any workaround which also uses variables? #one { width: 50px; height: 50px; background-color: gold; --o: 0; animation: roll-o-1 2s infinite alternate ease-in