我有一個表單提交按鈕。我使用精靈作爲背景,然後將鼠標懸停在我的按鈕寬度上以獲得懸停效果。但是,這不起作用。表單提交按鈕懸停效果不顯示
這是我的html:
<form class="a">
<All the other Fields...>
<p><input type="submit" value="Submit"/><p>
</form>
而且我的CSS:
.a input[type="submit"] {
margin-top: 15px;
background: url(btn.png) no-repeat;
width: 108px;
height: 42px;
border: none;
color: transparent;
font-size: 0;
}
.a input[type="submit"]:hover {
background: url(btn.png) no-repeat 109 0;
}
背景圖片的路徑是否正確? – j08691 2012-07-31 04:01:24