X 归档 2020-10-10
Very clever CSS trickery here from Carter Li. If you declare a CSS Custom Property as an <integer>, then it can be interpolated as an integer. Meaning it can be animated!
https://css-tricks.com/animating-number-counters/
https://css-tricks.com/animating-number-counters/
Carter Li 在这里用了一个非常聪明的 CSS 技巧。如果你把 CSS 自定义属性声明为 <integer>,它就能作为整数进行插值。这意味着它可以做动画!
https://css-tricks.com/animating-number-counters/
https://css-tricks.com/animating-number-counters/
Very clever CSS trickery here from Carter Li. If you declare a CSS Custom Property as an <integer>, then it can be interpolated as an integer. Meaning it can be animated!
https://css-tricks.com/animating-number-counters/
https://css-tricks.com/animating-number-counters/
Carter Li 在这里用了一个非常聪明的 CSS 技巧。如果你把 CSS 自定义属性声明为 <integer>,它就能作为整数进行插值。这意味着它可以做动画!
https://css-tricks.com/animating-number-counters/
https://css-tricks.com/animating-number-counters/
