2012-04-26 33 views
1

我找不出爲什麼我的CSS不能使用我的提交按鈕。我錯過了什麼嗎?提交帶圖像背景的按鈕 - CSS

.searchREG { 
    width: 184px; 
    height:175px; 
    float:left; 
    background: url('/admin/img/search.png') no-repeat; 
} 

.searchREG:hover { 
    background-position: 0 -175px no-repeat; 
    cursor:pointer 
} 


<input class="searchREG" type="submit" value="submit"> 
+0

什麼不起作用?它可以顯示在jsfiddle(http://jsfiddle.net/)?幫助你會容易得多 – skip405 2012-04-26 21:03:21

回答

2

你應該看看你的圖像的URL是否沒有問題。 (什麼東西不起作用?)

嘗試刪除圖像網址中的第一個斜槓。 (遇到過一次)

background: url('admin/img/search.png') no-repeat;