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>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM