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