美文网首页前端
webapp中的CSS3实现 0.5px的细线

webapp中的CSS3实现 0.5px的细线

作者: 阳光之城alt | 来源:发表于2017-08-23 10:11 被阅读17次

0.5px

微信图片_20170823100948.jpg
div class="sf bt">
    1px 常规
</div>

<br />
<div class="btn">.5px border </div>
<style>
    
    .sf{border: 1px solid royalblue;}
    
     .btn,.bt {
        position: relative;
        width: 200px;
        height: 42px;
        -webkit-border-radius: 5px;
        border-radius: 5px;
        text-align: center;
        line-height: 42px;
        background-color: #ededed;
      }
      .btn:before {
        content: "";
        position: absolute;
        top: -50%;
        bottom: -50%;
        left: -50%;
        right: -50%;
        -webkit-transform: scale(0.5);
        transform: scale(0.5);
        border-style: solid;
        border-width: 1px;
        border-color: red;
        -webkit-border-radius: 10px;
        border-radius: 10px;
      }
</style>
https://css-tricks.com/lozad-js-performant-lazy-loading-images/  懒加载

相关文章

网友评论

    本文标题:webapp中的CSS3实现 0.5px的细线

    本文链接:https://www.haomeiwen.com/subject/qaqddxtx.html