鼠标移入,元素宽度在2秒的时间里变宽 div { transition: width 2s; -webkit-transition: width 2s; /* Safari */ } div:hover { 300px; }