首页 > 代码库 > 1像素边框

1像素边框

1像素边框用2px来渲染,所以有这么个方法;

.a{
        width: 100px;
        height: 100px;
        border-top: 1px solid #333;
        position: relative;
    }
.a:after{
        content: "";
        position: absolute;
        bottom: 0px;
        width: 100%;
        border-bottom: 1px solid #333;
       transform: scaleY(0.5);
 }

1像素边框