transition过渡动画
让目标的CSS属性值在一定的时间范围内,平滑的过渡
transition
transition
:“改变的CSS属性” “过渡的时间” ‘’运动曲线‘ “延时时间”
transition:"transition-property" "transition-duration" "transition-timing-function" "transition-delay"
-
先不加动画
<style> div { width: 200px; height: 200px; background-color: lightsalmon; } div:hover { font-size: 50px; font-weight: 700; color: #ccf; text-align: center; line-height: 200px; background-color: #ccf; text-shadow: 1px 1px 4px #000, -1px -1px 4px #fff; border-radius: 50%; box-shadow: 1px -1px 10px #ccc; }