使用缩放,
html
1 <div class="slim"></div>
css
1 .slim{ 2 position: relative; 3 } 4 5 .slim:after{ 6 content: ""; 7 position: absolute; 8 top: 0; 9 left: 0; 10 width: 100%; 11 height: 1px; 12 -webkit-tranform: scaleY(.5); 13 tranform: scaleY(.5); 14 background-color: #ebebeb; 15 }
效果:上面是细线,下面是正常的1像素