CSS3实现0.5px的线

如何使用CSS3实现0.5PX的线

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>0.5px的线</title>
    <style>
        .line {
            position: absolute;
            left: 0;
            top: 10px;
            width: 100%;
            height: 1px;
            background-color: #000000;
            transform: scaleY(.5);
        }

        .line1 {
            position: relative;
            top: 20px;
            width: 100%;
            height: 1px;
            background-color: #000000;
        }
    </style>
</head>
<body>
<div class="line"></div>
<div class="line1"></div>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_35775675/article/details/89535131
今日推荐