手机端1px解决方案

xiaoxiao2021-02-28  20

手机端1px解决方案

通过伪类去加边框 .box position: relative &:after content: ' ' display: block position: absolute bottom: 0 left: 0 width: 100% border-top: 1px solid #000 //然后利用媒体查询,根据不同的物理像素比,对这个一像素边框进行缩放 @media (-webkit-min-device-pixel-radio: 1.5),(min-device-pixel-radio: 1.5) .border-1px &::after transform: scaleY(0.7) -webkit-transform: scaleY(0.7) @media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-radio:2) .border-1px &::after transform: scaleY(0.5) -webkit-transform: scaleY(0.5)
转载请注明原文地址: https://www.6miu.com/read-2400089.html

最新回复(0)