<form action="javascript:void(0)" method="post"> <div> <label>用户名:</label> <input type="text" value="" /> </div> <div> <label>密码:</label> <input type="password" value="" /> </div> <div> <label>电子邮箱:</label> <input type="email" value="" /> </div> </form>
label{ /*居右对齐*/ display: inline-block; width: 120px; height: 40px; text-align: right; }
label{ /*居中对齐*/ display: inline-block; width:120px; height: 40px; line-height: 40px; text-align: justify; text-align-last: justify; }
标签:40px,text,align,height,对齐,表单,居右 From: https://www.cnblogs.com/srqsl/p/18499998