0
我試圖做一個導航欄,一旦用戶點擊圖像,圖像保持活動。在下面的例子中,葉子在點擊之後會保持綠色。以下是我在談論的一些代碼:如何讓css按鈕在點擊後保持活動狀態?
<a class="myButtonLink" href="#LinkURL">Leaf</a>
<style>
.myButtonLink {
display: block;
width: 100px;
height: 100px;
background: url('http://kyleschaeffer.com/wordpress/wp-content/uploads/2009/01/buttonleafhover.png') bottom;
text-indent: -99999px;
}
.myButtonLink:hover {
background-position: 0 0;
}
</style>
不知道!會做。 – 2012-01-12 04:32:54