![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CSS
weixin_42282391
这个作者很懒,什么都没留下…
展开
-
解决float浮动元素不占据位置
1、利用after设置div.clearfix:after { content: ''; display: block; clear: both; visibility: hidden ;}2、利用overflow设置div,div { overflow: hidden;}3、利用clearn浮动元素后添加divdiv { clear:both}原创 2020-08-18 16:36:02 · 4264 阅读 · 0 评论 -
网页缩放,页面展示比例不变
获取网页缩放值(网上找的)detectZoom () { let ratio = 0, screen = window.screen, ua = navigator.userAgent.toLowerCase(); if (window.devicePixelRatio !== undefined) { ratio = window.devicePixelRatio; } else if (~ua.indexOf('m.原创 2020-06-24 14:30:18 · 2797 阅读 · 3 评论 -
div上下左右居中
欢迎补充原创 2019-03-16 11:10:29 · 4576 阅读 · 0 评论