Do not use nth-child encoding, which will not help change the background image of the active page. Use the following CSS code instead:
margin: 0;
padding: 0;
list-style-type: none;
background:url(../m1.png);
}
display:block;
height:195px;
width:78px;
}
.active{
background:url(../m1_selected.png);
}
margin: 0;
padding: 0;
list-style-type: none;
background:url(../m2.png);
}
display:block;
height:195px;
width:78px;
}
.active1{
background:url(../m2_selected.png);
}
Html code:
<ul id="uiList">
<li><a href="#"></a></li>
</ul>
<ul id="uiList1">
<li><a href="#"></a></li>
</ul>
source
share