不同retina,显示高度不一样,很显然最细的线条最美

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            padding:0;
            margin:0;
            box-sizing: border-box;
        }
        .box{
            width:100%;
            height: 1px;
            background: red;
            margin-top: 50px;
        }
   
        @media (-webkit-min-device-pixel-ratio: 2){
            .box2{
                transform: scaleY(.5)
            }
        }
        @media (-webkit-min-device-pixel-ratio: 3){
            .box3{
                transform: scaleY(.333)
            }
        }
        @media (-webkit-min-device-pixel-ratio: 4){
            .box4{
                transform: scaleY(.1)
            }
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="box box2"></div>
    <div class="box box3"></div>
    <div class="box box4"></div>
</body>
</html>

  关于不同retina的布局

相关文章:

  • 2022-12-23
  • 2021-07-23
  • 2021-09-13
  • 2021-06-23
  • 2021-07-14
  • 2022-02-10
  • 2021-08-17
  • 2021-10-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-04-04
相关资源
相似解决方案