zoukankan      html  css  js  c++  java
  • 移动端1px 边框

    伪类+ transform
    .border_1px:before{
              content: '';
              position: absolute;
              top: 0;
              height: 1px;
               100%;
              background-color: #000;
              transform-origin: 50% 0%;
            }
            @media only screen and (-webkit-min-device-pixel-ratio:2){
                .border_1px:before{
                    transform: scaleY(0.5);
                }
            }
            @media only screen and (-webkit-min-device-pixel-ratio:3){
                .border_1px:before{
                    transform: scaleY(0.33);
                }
            }
    

    设备像素比device pixel ratio简称dpr,即物理像素和设备独立像素的比值。
    scaleY(y) 通过设置 Y 轴的值来定义缩放转换。

  • 相关阅读:
    集合
    字典
    元组
    列表
    数字类型和字符串类型
    Python 数据类型
    jq的一点点
    常用到jq的ajax
    上传
    下载
  • 原文地址:https://www.cnblogs.com/whkl-m/p/10951192.html
Copyright © 2011-2022 走看看