这是我的文本CSS,但文本不在中心。请给我解释为什么它不在中心。中心的文本对齐
.button {
background-color: #338DFF;
border: none;
width : 15px;
height : 15px;
color: white;
border-style: solid;
line-height: 2px;
border-color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
margin: 4px 2px;
font-size: 16px;
cursor: pointer;
}
它是'padding'属性 – Laazo
您是否尝试过text-align:center!important; –
当处理CSS问题时,通常以“我需要移除哪些东西”开头为佳 - 更简单有时更好 –