Created
May 22, 2019 02:36
-
-
Save wxingheng/ede3243a78a74f39c564b14c7d103c87 to your computer and use it in GitHub Desktop.
移动端1px细线解决方案总结
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- :before, :after与transform | |
```language | |
.radius-border{ | |
position: relative; | |
} | |
@media screen and (-webkit-min-device-pixel-ratio: 2){ | |
.radius-border:before{ | |
content: ""; | |
pointer-events: none; /* 防止点击触发 */ | |
box-sizing: border-box; | |
position: absolute; | |
width: 200%; | |
height: 200%; | |
left: 0; | |
top: 0; | |
border-radius: 8px; | |
border:1px solid #999; | |
-webkit-transform(scale(0.5)); | |
-webkit-transform-origin: 0 0; | |
transform(scale(0.5)); | |
transform-origin: 0 0; | |
} | |
} | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment