我在html中有这样简单的形式:
<form action="add" method="get">
<input name="ok" type="submit" value="ok" class="btn" />
<a class="btn" href="ok">ef</a>
</form>
我有这样的CSS:
.btn {
font-family: Arial, Tahoma, Verdana, sans-serif;
font-size: 14px;
font-weight: bold;
text-shadow: 0 -1px rgba(127, 127, 127, 0.5);
text-decoration: none;
line-height: normal;
text-align: center;
cursor: pointer;
display: inline-block;
/*padding: 5px 12px;*/
color: #fff;
border-bottom: 1px solid #EEE;
outline: none;
border: none;
background-repeat: no-repeat;
background: -o-linear-gradient(top, #3BA5C8, #2A829E);
background: -moz-linear-gradient(top, #3BA5C8, #2A829E);
background: -webkit-linear-gradient(left top, left bottom, #3BA5C8, #2A829E);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3BA5C8', endColorstr='#2A829E');
}
但是怎么了?在Firefox和ie 7得到那个tegs:a和输入(提交)不同的高度,sumbit更大,a更小。请帮帮我。
请参阅http://jsfiddle.net/TxQpN/14/有效,即FF,但不是IE7
答案 0 :(得分:0)
您必须为<a>
&amp; button
喜欢这样:
.btn{
height:30px;
vertical-align:top;
}