類拿出一個對一個奇怪的問題......爲什麼Firefox在鏈接<a>和<input type = submit>中顯示不同的CSS?
這裏是我的一個按鈕CSS:
a.cta-btn-green {
color:#fff !important;
font-size:14px !important;
font-weight:bold;
text-shadow: #060 1px 1px 1px;
background-color:#329122;
padding:5px 10px;
-moz-border-radius:14px;
-webkit-border-radius:14px;
text-decoration:none;
float:right;
border:0;
font-family:Arial, Helvetica, sans-serif;
cursor:pointer;
background: -moz-linear-gradient(100% 100% 90deg, #307d23, #4ac236);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4ac236), to(#307d23));
}
input.cta-btn-green {
color:#fff !important;
font-size:14px !important;
font-weight:bold;
text-shadow: #060 1px 1px 1px;
background-color:#329122;
padding:5px 10px;
-moz-border-radius:14px;
-webkit-border-radius:14px;
text-decoration:none;
float:right;
border:0;
font-family:Arial, Helvetica, sans-serif;
cursor:pointer;
background: -moz-linear-gradient(100% 100% 90deg, #307d23, #4ac236);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4ac236), to(#307d23));
}
兩個CSS類是相同的,但一個被應用到<a>
,另一個是應用於<input type="submit" />
...效果是,Firefox給出的input.cta-btn-green
的高度大於a.cta-btn-green
?
任何人都可以告訴我哪裏出錯了嗎?
感謝
字體較高還是整個元素? – thejh 2010-11-01 12:42:56
整個元素 – Nasir 2010-11-01 12:44:11