wangnantjobj 2019-06-30
text-align: justify;
text-align-last: justify; 参见https://www.css88.com/book/css/properties/text/text-align-last.htm
<ul class="g-formlist"> <li> <label class="mark">姓 名</label> <div class="write"> <input type="text" id="form-name" class="g-text-entry" placeholder="请输入4-10字符" /> <span class="tip" data-initial="请输入4-10字符"></span> </div> </li> <li> <label class="mark">密 码</label> <div class="write"> <input type="text" id="form-psw" class="g-text-entry" placeholder="请输入6-30字符" /> <span class="tip" data-initial="请输入6-30字符"></span> </div> </li> <li> <label class="mark">确 认 密 码</label> <div class="write"> <input type="text" id="form-repsw" class="g-text-entry" placeholder="请再输入一遍密码" /> <span class="tip" data-initial="请输入6-30字符"></span> </div> </li> <li> <label class="mark">验 证 码</label> <div class="write"> <input type="text" id="form-imgcode" class="g-text-entry disabled" disabled="disabled" placeholder="输入验证码" /> <span class="tip" data-initial="请输入验证码"></span> </div> </li> </ul>
li { clear: both; list-style: none; } .mark { display: block; float: left; overflow: hidden; width: 78px; height: 29px; padding-right: 10px; text-align: justify; text-align-last: justify; line-height: 2; }
英文字符和数字不会两端对齐
background-color: blue;background-color: yellow;<input type="button" value="变蓝" @click="changeColorT