我在按钮内使用非典型的图像背景.我需要让这个文本在按钮内显示为"高于"默认值(垂直居中).我该怎么办?
CSS:
.button {
width: 211px;
height: 66px;
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
text-transform: uppercase;
color: white;
background: url('../img/button.png') no-repeat;
border: none;
cursor: pointer;
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<input type="submit" class="button" value="Submit"/>
(...)
<button class="button">Get a quote</button>
Run Code Online (Sandbox Code Playgroud)
浏览器屏幕:

正如您所看到的那样,按钮中的文本应该比现在更高一点
设置padding-bottom.
button{
width: 300px;
height: 300px;
padding-bottom: 200px;
}
Run Code Online (Sandbox Code Playgroud)