属性变化时的补间动画,定义「怎么变过去」。
<div class="tn"><i></i></div>.tn i { display: block; width: 70px; height: 44px; border-radius: 8px; background: #2b57ff; transition: width .4s cubic-bezier(.2,.9,.3,1), background .4s; }
.tn:hover i { width: 170px; background: #ff8a5c; }