Skip to content

Instantly share code, notes, and snippets.

@mqxu
Created November 3, 2019 12:11
Show Gist options
  • Save mqxu/852fea6b000cfe282c7b4d688c0ce4a9 to your computer and use it in GitHub Desktop.
Save mqxu/852fea6b000cfe282c7b4d688c0ce4a9 to your computer and use it in GitHub Desktop.
【iCSS:布局】使用text-align-last对齐两端文本
<div class="bruce flex-ct-x">
<ul class="justify-text">
<li>账号</li>
<li>密码</li>
<li>电子邮件</li>
<li>通讯地址</li>
</ul>
</div>
.justify-text {
li {
margin-top: 5px;
padding: 0 20px;
width: 100px;
height: 40px;
background-color: #f66;
line-height: 40px;
text-align-last: justify;
color: #fff;
&:first-child {
margin-top: 0;
}
}
}
<link href="https://yangzw.vip/static/css/reset.css" rel="stylesheet" />
<link href="https://yangzw.vip/static/css/main.css" rel="stylesheet" />
<link href="https://yangzw.vip/static/css/theme.scss" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment