.justify-label {
white-space: normal;
width: 100px;
text-align: justify;
height: 20px;
line-height: 20px;
display: inline-block;
vertical-align: middle;
}
.justify-label:after {
content: " ";
display: inline-block;
width: 100%;
}
使用:(一定要有空格,兼容其他浏览器)
<div> <div class="justify-label">姓 名</div>: </div> <div> <div class="justify-label">联 系 方 式</div>: </div> <div> <div class="justify-label">邮 箱</div>: </div>
转载于:https://www.cnblogs.com/kaibo520/p/10622408.html
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/101013.html原文链接:https://javaforall.net