我有一个带有文本的按钮,文本似乎没有在按钮内垂直对齐。这只发生在 IE 10 上。Chrome 是完美的。
HTML
<input type="text" id="postcode" name="Postcode" class="input" placeholder="enter your postcode..." maxlength="8" size="10"><button class="button" type="submit" id="postcode">FIND DEALS</button>
CSS
.banner-input button{
background: #0072bc;
font-family: "Myriad Pro", 'Open Sans', sans-serif;
font-size: 15px;
font-weight: 600;
width: 108px;
height: 54px;
margin: 0 0 0 10px;
border: 1px solid #00548a;
-webkit-box-shadow: rgba(0,0,0,0.5) 0px 1px 0px,#2888c7 0px 1px 0px inset;
-moz-box-shadow: rgba(0,0,0,0.5) 0px 1px 0px,#2888c7 0px 1px 0px inset;
box-shadow: rgba(0,0,0,0.5) 0px 1px 0px,#2888c7 0px 1px 0px inset;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
background: #005f9c;
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FF0072BC', endColorstr='#FF005F9C');
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f7b814), color-stop(100%, #ff9100));
background-image: -webkit-linear-gradient(top, #0072bc 0%, #005f9c 100%);
background-image: -moz-linear-gradient(top, #0072bc 0%, #005f9c 100%);
background-image: -o-linear-gradient(top, #0072bc 0%, #005f9c 100%);
background-image: linear-gradient(top, #0072bc 0%, #005f9c 100%);
color: #fff;
line-height: 40px;
vertical-align: middle;
}
我尝试了各种行高和填充。似乎没有任何效果。:(