【发布时间】:2021-04-17 05:02:08
【问题描述】:
我正在尝试弄清楚转换、动画和过渡是如何工作的,我已经学习了至少 1 或 2 节速成课程,并且在与此相关的问题上遵循了 5 种解决方案,但仍然没有任何效果。
#tr-w {
transition: width 1s ease-in-out;
}
#tr-w:hover {
width: 50%;
}
#tr-h {
transition: height 2s ease-in-out;
}
#tr-h:hover {
height: 40vh;
}
#tr-r {
transition: width 1s ease-in-out, transform 2s ease-in-out;
}
#tr-r:hover {
transform: rotateZ(180);
width: 30vh;
}
JSFiddle:https://jsfiddle.net/q976oc0h/1/
代码沙盒:https://codesandbox.io/s/dark-pine-i0ut5?file=/index.html
代码笔:https://codepen.io/ssssss12518/pen/rNMMZoL
它不适用于我所知道的任何代码编辑器,即使是像 Atom 这样的 IDE。 (我的主要文本编辑器)
【问题讨论】:
-
transform: rotateZ(180);-->transform: rotateZ(180deg);
标签: html css animation transition