The front-end students must have encountered the problem of 1px frame, in the high-split screen mobile phone, we will find that they write 1px tend to be more than expected "coarse" some, the following is a summary of the solution for others.
Single
Write a line with a height of 1px and then zoom through Transform:scaley (0.5) to achieve
1 Div {2 height:1px; 3 background:#ddd; 4 -webkit-transform: ScaleY (0.5); 5 -webkit-transform-origin:0 0; 6 overflow: hidden; 7 }
Borders + rounded Corners
And the above ideas are the same, but also by zooming in and then narrowing the implementation, it is important to note that the width and the fillet to be set to twice times the original
1 Div{2 position:relative;3}4 Div:before{5 content: "";6 position:Absolute;7 Top:0;8 Left:0;9 width:200%;/*Wide Zoom*/Ten Height:200%; One Border:Solid 1px #ddd; A Border-radius:10px;/*rounded corners to enlarge*/ - Overflow:Hidden; - Transform-origin:0 0; the -webkit-transform-origin:0 0; - Transform:Scale (0.5, 0.5); - -webkit-transform:Scale (0.5, 0.5); -}
Source Address:
1PX Solutions
Reference Link: http://www.cnblogs.com/shuiyi/p/5568348.html
Mobile 1px Solutions