About the solution of the 1px problem on the mobile terminal
Others
2020-04-22 14:11:54
views: null
Use =>:after和:before实现
Parent element =>position:relative
- Single line does not require chamfering =>
:after{content:'';position:absolute;width:100%;height:1px;transform:scaleY(0.5);bottom:0px;left:0px;orign-tansform:bottom left;}
- Multi-line needs chamfering =>
:after{content:'';position:absolute;border:1px solid #000;width:200%;height:200%;tansform:scale(0.5);top:0px;left:0px;orign-transform:0 0;}
- Multi-line needs chamfering =>
:after{content:'';position:absolute;border:1px solid #000;tansform:scale(0.5);top:-50%;left:-50%;bottom:-50%;right:-50%;orign-transform:0 0;}
Origin www.cnblogs.com/yogic/p/12470428.html