transition 属性是一个简写属性,用于设置四个过渡属性:
注释:请始终设置 transition-duration 属性,否则时长为 0,就不会产生过渡效果。
| 默认值: | all 0 ease 0 | 
| 继承性: | no | 
| 版本: | CSS3 | 
| JavaScript 语法: | object.style.transition="width 2s" | 
语法
来自 <https://www.w3school.com.cn/cssref/pr_transition.asp>
| 值 | 描述 | 
| 规定设置过渡效果的 CSS 属性的名称。 | |
| 规定完成过渡效果需要多少秒或毫秒。 | |
| 规定速度效果的速度曲线。 | |
| 定义过渡效果何时开始。 | 
来自 <https://www.w3school.com.cn/cssref/pr_transition.asp>
原文:https://www.cnblogs.com/zhanghua-lijie/p/14892096.html