一、IE和Chrome等浏览器与zoom 还在几年前,zoom还只是IE浏览器自己私有的玩具,但是,现在,除了FireFox浏览器,其他,尤其Chrome和移动端浏览器已经很好支持zoom属性了:
顺晟科技
2022-09-13 14:22:42
39
一、:hover
<div class="outdiv"> <div class="indiv"></div> </div>
.outdiv { width: 100px; height: 100px; background-color: red; perspective: 400px; } .indiv { width: 100px; height: 100px; background-color: green; transition: all 1s linear; transform-origin: left center; } .outdiv:hover .indiv { transform: rotateY(-180deg); }
二、zoom和transform: scale()区别
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"> .div1 { width: 300px; height: 300px; background: red; zoom: 0.5;/*实际元素的宽高会发生变化*/ } .div2 { width: 300px; height: 300px; background: green; transform: scale(0.5);/*实际元素的宽高不会发生变化*/ } </style> </head> <body> <div class="div1"></div> <div class="div2"></div> </body> </html>posted on 2020-07-10 09:35 一路繁花似锦绣前程 阅读(264) 评论(0) 编辑 收藏 举报
13
2022-09
13
2022-09
13
2022-09
13
2022-09
13
2022-09
13
2022-09