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

    /*.html文件*/

    <div class="border">
    <span>1px宽度问题</span>
    </div>

    /*.css文件*/

    .border {
    box-sizing: border-box;
    200px;
    height: 40px;
    text-align: center;
    position: relative;
    }
    .border span {
    font-size: 14px;
    line-height: 40px;
    }
    .border span:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right:0;
    200%;
    height: 200%;
    border: 1px solid red;
    border-radius: 4px;
    color: #d5d5d6;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    /*1px边框的缩放,如果只有left或者right的 则只需要X轴缩放,若是top或者bottom 则是Y轴缩放*/
    -webkit-transform: scaleX(0.5) scaleY(0.5); 
    transform: scaleX(0.5) scaleY(0.5);
    }
  • 相关阅读:
    9.4
    9.3
    9.2
    2016.9.1
    html,body
    prototype
    京东笔试题的一些小细节
    gulp安装过程中的问题。
    json
    双飞翼布局和圣杯布局
  • 原文地址:https://www.cnblogs.com/ruishuiweixiang/p/8581245.html
Copyright © 2011-2022 走看看