ul { width:800px; height:150px; overflow:hidden; list-style:none; } ul li { width:180px; float:left; height:150px; transition:all .3s linear; } ul li img { width:100%; height:150px; } .active { width:260px; }
更新时间:2020-06-05 09:54:06
用个active类直接改变宽度,加上transition有动画过渡效果