2
我有一個的jsfiddle hereCSS - 垂直對齊文本
我知道這是超級簡單,但我無法得到它的工作
我只需要文本居中垂直
.pdf-button{
background: #eee;
}
.pdf-button p{
display: inline;
}
.pdf-button a{
display: inline-block;
padding-right: 20px;
vertical-align: middle;
}
i{
color: #aaa;
}
這是因爲圖標的高度,您的文本位於底部。您可能希望刪除「p」標籤上的邊距,並使用行高進行操作。 – putvande