CSS3 transform 属性值 scale 放大缩小后变模糊的解决办法:
transform 属性 scale 缩放动画代码如下,在鼠标经过hover代码加入 transform:translateZ(0) 就可以了。
<style>
.img_box{ width:200px; height:200px; overflow:hidden;}
.img_box img{ width: 100%; transform:translateZ(0) scale(1); transition: all .8s;} /*缩小后不会变模糊*/
.img_box img:hover{ transform:translateZ(0) scale(1.1);} /*放大后不会变模糊*/
</style>
<div class="img_box">
<img src="img.jpg">
</div>
下一篇:
^-^ 已经是最后一篇啦
文章推荐
-
为什么是“程序猿”而不是“程序媛”?
2019-01-01 19:58 757 -
谈谈如何在面试中发掘程序员的核心竞争力
2019-01-01 20:09 695 -
马化腾:互联网的下7个爆发点在哪?
2019-01-01 20:22 651 -
总结我的程序员之路 – 毕业找工作
2019-01-01 19:40 659 -
程序员杂谈之顶级程序员的10条最佳实践
2019-01-01 20:22 635