設(shè)置了letter-spacing之后字符偏左哑子,如圖:
image
<input type="button" class="submit-button" value="登錄" v-on:click="login"/>
.submit-button {
display: block;
width: 100%;
margin: 40px 0 20px;
color: #FFFFFF;
background-color: #2198E6;
cursor: pointer; /*顯示小手*/
border: none;
line-height: 40px;
font-size: 16px;
text-align: center;
letter-spacing: 1em; /*文字間隔*/
border-radius: 20px;
outline: none;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
解決方法 : 添加屬性 text-indent: 1em; /*首行縮進(jìn)*/
image
.submit-button {
display: block;
width: 100%;
margin: 40px 0 20px;
color: #FFFFFF;
background-color: #2198E6;
cursor: pointer; /*顯示小手*/
border: none;
line-height: 40px;
font-size: 16px;
text-align: center;
letter-spacing: 1em; /*文字間隔*/
text-indent: 1em; /*首行縮進(jìn)洪橘,文字間隔后居中*/
border-radius: 20px;
outline: none; /*無邊框*/
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s; /*動(dòng)畫一直生效*/
}