方法一: .container{ background-size: 100% 100%; transition: all 2s; } .container:hover{ background-size: 120% 120%; } 方法二: img{ transition: all 2s; } img:hover{ transform:scale(1.2); //图片放大的倍数 }
方法一: .container{ background-size: 100% 100%; transition: all 2s; } .container:hover{ background-size: 120% 120%; } 方法二: img{ transition: all 2s; } img:hover{ transform:scale(1.2); //图片放大的倍数 }