码迷,mamicode.com
首页 > 移动开发 > 详细

移动端半像素 0.5PX 边框实现。

时间:2017-07-19 10:32:28      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:otto   scale   ati   relative   hal   for   code   color   bsp   

 1 /*半像素*/
 2 .halfpxline_after, .halfpxline_before {
 3   position: relative;
 4 }
 5 
 6 .halfpxline_after:after, .halfpxline_before:before {
 7   content: ‘‘;
 8   display: block;
 9   position: absolute;
10   left: 0;
11   right: 0;
12   height: 1px;
13   background-color: #e5e5e5;
14   -webkit-transform: scaleY(0.5);
15   transform: scaleY(0.5);
16 }
17 
18 .halfpxline_after:after {
19   bottom: 0;
20   -webkit-transform-origin: 0 1px;
21   transform-origin: 0 1px;
22 }
23 
24 .halfpxline_before:before {
25   top: 0;
26   -webkit-transform-origin: 0 0;
27   transform-origin: 0 0;
28 }

 

移动端半像素 0.5PX 边框实现。

标签:otto   scale   ati   relative   hal   for   code   color   bsp   

原文地址:http://www.cnblogs.com/Evo1uti0n/p/7203958.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!