谁做过渡给谁加 .bar_in{ width: 50%; height: 100%; background-color: red; border-radius: 7px; transition: all .5s; } .bar:hover .bar_in{ width: 100%; } 当鼠标经过bar的时候给.bar_in添加过渡效果,故给bar_in添加过渡