zoukankan      html  css  js  c++  java
  • 【移动端适配】适配1个像素的border

     1 .b-top,.b-btm {
     2     position:relative;
     3 }
     4     .b-top:before {
     5         content:' ';
     6         display:block;
     7         width:100%;
     8         position:absolute;
     9         left:0;
    10         top:0;
    11         border-top:1px solid #e7e7e7;
    12         -webkit-transform-origin:left top;
    13     }
    14     .b-btm:after {
    15         content:' ';
    16         display:block;
    17         width:100%;
    18         position:absolute;
    19         left:0;
    20         bottom:0;
    21         border-bottom:1px solid #e7e7e7;
    22         -webkit-transform-origin:left bottom;
    23     }
    24 
    25     /* Retina 适配 */
    26 
    27 @media only screen and (-webkit-min-device-pixel-ratio: 2.0),
    28 only screen and (min--moz-device-pixel-ratio: 2.0),
    29 only screen and (-o-min-device-pixel-ratio: 200/100),
    30 only screen and (min-device-pixel-ratio: 2.0) {
    31     .b-top:before,.b-btm:after {
    32         -webkit-transform: scaleY(0.5);
    33         transform: scaleY(0.5);
    34     }
    35 }
    36 
    37 /* 三倍屏 适配 */
    38 
    39 @media only screen and (-webkit-min-device-pixel-ratio: 2.5),
    40 only screen and (min--moz-device-pixel-ratio: 2.5),
    41 only screen and (-o-min-device-pixel-ratio: 250/100),
    42 only screen and (min-device-pixel-ratio: 2.5) {
    43    .b-top:before,.b-btm:after{
    44         -webkit-transform: scaleY(0.33333334);
    45         transform: scaleY(0.33333334);
    46     }
    47 }
  • 相关阅读:
    CentOS yum 安装svn1.8
    js 替换掉汉字 和替换非汉字 比较时间JS
    PhpStorm 10 破解
    html中link的用法
    CSS3:nth-child()伪类选择器
    提示的小三角
    css 高度自适应
    <input type="file" />浏览时只显示指定文件类型
    MySQL查询表内重复记录
    扒站小工具
  • 原文地址:https://www.cnblogs.com/front-end-develop/p/5728082.html
Copyright © 2011-2022 走看看