Home >Web Front-end >HTML Tutorial >I am willing to ask all the gods why the color does not change when the mouse is rolled over~_html/css_WEB-ITnose
html代码:
I want to change the green of the TAB label to yellow
In this style :
.ch_ul_tab li{
width:70px;
height:25px;
float:left;
list-style:none;
margin-left:20px;
text-align:center;
background:green;
border-top:1px solid gray;
border-left:1px solid gray;
border-right:1px solid gray;
}
Remove background:green; and you can simply change the color (it seems to be adding background:yellow; to the above style), but the logic is wrong!
.ch_ul_tab li.active{
background:yellow;
border-bottom:1px solid white;
}
.ch_ul_tab li.active{
background:yellow;
border-bottom:1px solid white;
}
Correct answer.