你好我對css sprite有一些誤解。我想有一個像波紋管(帶綠色對號懸停一個按鈕,它的工作原理就像一個魅力,如果我使用這2張照片組合成背景url和背景位置的精靈。輸入按鈕結合背景和精靈懸停
link to the picture explanation 遺憾沒有足夠的聲譽張貼圖片
但我的問題是,按鈕由帶有背景
,我把它精靈與對勾(假)
但是沒有辦法做相同,但與懸停狀態(真正的複選標記)
我的HTML
<div class="sprite sprite-novalid"> </div>
<input type="button" id="cancel" value="Cancel" name="button" onclick="" class="btn" title="Cancel [Alt+X]">
我的CSS:對於沒有任何對號
.btn,input[type="button"],.btn{
background-color:#ECF1F4;
background-image:url(http://);
border-color:#ABC3D7;
color:#000000}
.btn, input{
border-radius:12px;
height: 31px;
width: 180px}
我的CSS背景按鈕:對於精靈
.sprite {
background: url(http://);
no-repeat;}
我的CSS:爲虛假選中標記(灰色)
.sprite-novalid {
width: 19px;
height: 16px;
background-position: -31px 2px;
position: absolute;
display: inline-block;
bottom: 134px;
left: 21px;}
對於懸停CSS,我把什麼因爲有那麼多的錯誤
感謝大家的意見,和/或把我在正確的軌道上。
問候 迪米特里