我有以下css鏈接。將圖像轉換爲按鈕圖像:刪除邊框
<a href="step1.php">Buy Now</a>
//css
#buy a {
background:transparent url(signup_bt.gif) repeat scroll 0 0;
color:#FFFFFF;
display:block;
font-size:14px;
font-weight:bold;
height:37px;
line-height:38px;
text-align:center;
text-decoration:none;
width:126px;
}
#buy a:hover{
background:transparent url(signup_bt2.gif) repeat scroll left bottom;
}
我現在需要將其更改爲提交按鈕,以便在窗體中使用並且看起來完全像以前一樣。我這樣做:
<input type="submit" value="Buy Now" />
#buy input{
color:#FFFFFF;
font-size:14px;
font-weight:bold;
height:37px;
line-height:38px;
text-align:center;
text-decoration:none;
width:126px;
background:transparent url(signup_bt.gif) repeat scroll 0 0;
display:block;
}
#buy input:hover{
background:transparent url(signup_bt2.gif) repeat scroll left bottom;
}
它幾乎工作,但它的周圍有一個可怕的邊框,並懸停在按鈕進入頁面。我怎樣才能解決這個問題?
如何刪除邊框以及如何獲取按鈕以正常交換圖像,而不是進入頁面。
感謝所有
我以爲我嘗試過,但它實際上是邊框式:我沒有做過! – Abs 2009-10-09 11:37:34