1. 程式人生 > >解決移動端border 1畫素變2畫素問題

解決移動端border 1畫素變2畫素問題

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/rem.js"></script>
    <style>
.border1:after {
            position: absolute;
right: 0;
bottom: 0;
left: 0px;
height: 1px;
content: '';
-webkit-transform
: scaleY(.5); transform: scaleY(.5); background-color: #000; } .border{ width:1rem; height:.0075rem; background:red; margin-top:20px; position:absolute; left:0; top:20px; } </style> </head> <body> <div style="position:relative;"> <div class="border1"></div>
<div class="border"></div> </div> </body> </html>