JavaScript30 是用纯JavaScript姿势去实现一些功能, 一共三十道题目, 链接github.com/wesbos/Java…
transform-origin
设置旋转元素基点位置
transform-origin: x y z;
x(left, center, right, length, %); y(top, center, bottom, length, %); z(length)
对第二个css时钟挑战, 通过设置不同指针长度和旋转元素基点right值, 实现时分秒针不同长度效果
CSS Variables
具有层叠 继承性
编译后仍可以动态改变
js对css 变量的访问
*.style.setProperty('--width', '20px');
*.style.getPropertyValue('--width').trim();
*.style.removeProperty('--width');