关于css:css实现文字左右两端对齐

1次阅读

共计 300 个字符,预计需要花费 1 分钟才能阅读完成。

做表单想要实现如下成果。

    span{
      border:1px solid red; 
      width:10em;
      display:inline-block;
      text-align:justify; // 须要换行能力有成果,那么咱们减少伪类,来实现换行。height:19px;// 垂直居中
      line-height:19px;// 垂直居中
      overflow:hidden;// 让伪类不要显示进去
    }
    span::after{
       content:'';
       width:100%;
       display:inline-block;
    }   
  <span> 姓名 </span><br>
  <span> 联系地址 </span><br>
  <span> 社会对立信用代码 </span>
正文完
 0