• UI设计中,文本底部添加下换线


    最近在开发项目,针对小程序前端,显示文本需要添加下划线问题,起初是通过border-bottom:1rpx solid #eee; 进行编写,但是总是觉得线的高度过于粗,移动端最小单位值是 1  即:1rpx 1px,高度设置0.3是不生效的,后面看到相关博客通过 scale进行划线,在这记录下:

    <div class="line-bottom">
    zty
    </div>
    .line-bottom{
       position:relative;
    }
    .line-bottom:after{
       content:" ";
       position:absolute;
       left:0;
       bottom:0;
       width:100%;
       height:1px;
       transform:scaleY(.5);
       background-color:#eeeeee;
    }

  • 相关阅读:
    Document
    Document
    Document
    Document
    Document
    Document
    Document
    Document
    8.React 组件封装
    window.location / history / 以及相关事件
  • 原文地址:https://www.cnblogs.com/zty-Love/p/11251718.html
Copyright © 2020-2023  润新知