webapp中的CSS3实现 0.5px的细线

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/  懒加载
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容