ios苹果机系统的1px显示解决方案

1px边框在iPhone高清屏下,其实会变成2个物理像素的边框。

/* 解决一像素问题 */
.navigation:before{
    content: "";
    pointer-events: none; /* 防止点击触发 */
    box-sizing: border-box;
    position: absolute;
    width: 200%;
    height: 200%;
    left: 0;
    top: 0;
    border-top:1px solid #e5e5e5;
    -webkit-transform-origin: 0 0;
    transform: scale(.5);
    -webkit-transform:scale(.5);
    transform-origin: 0 0;
    
}

 注意 给的元素本身要 相对定位  position: relative;

posted @ 2016-12-07 12:46  Model-Zachary  阅读(576)  评论(0编辑  收藏  举报