Skip to main content

Command Palette

Search for a command to run...

CSS Transform Is Dead! Use This Instead

Published
•1 min read•View as Markdown
CSS Transform Is Dead! Use This Instead
J

Nothing is true, everything is permitted.

  1. 同時使用多種 transform

因為 transform 是一種屬性,所以當套用多個 class 時,上面的會 transform 會被下面的 transform 蓋掉

例如:

有 scale 和 translate

同時套用 class moved 和 small ,scale 的效果會被 translate 蓋掉

使用屬性 scale 和 translate 就可以同時套用,因為是不同屬性

2. css variable 沒辦法漸變

因為 css variable 沒辦法變成連續動畫

會變成下面的樣子

改用屬性 rotate

變成連續動畫

More from this blog

Untitled Publication

244 posts