我想做一个鼠标移动到图片 然后图片放大的动作,但是用hover类没有反应 用js会出错,大神教教我
2个回答
展开全部
不要用js
给<img src="" class="fangda">
.fangda{width:210px;transition:all .3s ease-in-out;-webkit-transform:all .3s ease-in-out;-ms-transform:all .3s ease-in-out;-o-transform:all .3s ease-in-out;-moz-transform:all .3s ease-in-out}
.fangda:hover{transform:scale(1.04,1.04);-webkit-transform:scale(1.04,1.04);-ms-transform:scale(1.04,1.04);-o-transform:scale(1.04,1.04);-moz-transform:scale(1.04,1.04)}
给<img src="" class="fangda">
.fangda{width:210px;transition:all .3s ease-in-out;-webkit-transform:all .3s ease-in-out;-ms-transform:all .3s ease-in-out;-o-transform:all .3s ease-in-out;-moz-transform:all .3s ease-in-out}
.fangda:hover{transform:scale(1.04,1.04);-webkit-transform:scale(1.04,1.04);-ms-transform:scale(1.04,1.04);-o-transform:scale(1.04,1.04);-moz-transform:scale(1.04,1.04)}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询