CSS3实现小于1px的边框(移动端)
<!doctype html> <html lang="en"> <head> <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"> <meta charset="UTF-8"> <title>CSS3实现小于1px的边框(移动端)</title> <style type="text/css"> *{margin: 0;padding: 0;-webkit-box-sizing:border-box;} .div-big{ position: relative; } .div-small{ height: 60px; line-height: 60px; padding-left: 10px; position: relative; font-size: 20px; } .div-small:after{ content: ""; display: block; position: absolute; left: -50%; width: 200%; height: 1px; background: #ededed; -webkit-transform:scale(0.5); } </style> </head> <body> <div class="div-big"> <div class="div-small">第一块</div> <div class="div-small">第二块</div> </div> </body> </html>