2012-12-08 74 views
0

所以,我試圖讓我的導航箭頭在它們懸停時「減輕」。圖像本身有2個「狀態」,其中一個被照亮,另一個沒有。目前一直處於活動狀態的是非點亮狀態,而我在某處發現了一些關於改變圖像位置的東西(發光的狀態在.png之下),當它們懸停時。這會是什麼樣子(當注意到我有.hero-carousel-nav和所有這些)?當滑動箭頭移動時發出「發光」

實現類似這樣的東西?這會在盤旋時移動.png,使其顯示「發光」箭頭?如果是這樣,我應該放什麼,而不是下面的「something.here」?

.something.here-arrow-right:hover { background-position: 0 -40px; }

這裏是我的向右箭頭的例子。

CSS

.hero-carousel-nav li.next a { 
background: url('../images/deadmau5/large-arrow-right.png') -5px -7px no-repeat; 
display: inline-block; 
width: 105px;  /*width of your img*/ 
height: 105px;  /*height of your img*/ 
font-size: 0px; 
right: -15px; /*this is better than 1px*/ 
bottom: 100px; 
overflow:hidden; 
outline:none; 
z-index: 3; 
+0

的問題。 – Jai

回答

2
.hero-carousel-nav li.next a:hover{ 
    background-position: 0 -40px; 
} 
再次
+0

我確實是那樣在'next'之後忘了'a'!謝謝! –