我應該在style.css中放入什麼樣的CSS代碼,以便菜單字體在選定狀態時變爲黑色和粗體。CSS選擇的狀態
<li class="selected"><a href="/health-coaching.html">Health Coaching</a></li>
幫助!感謝
我應該在style.css中放入什麼樣的CSS代碼,以便菜單字體在選定狀態時變爲黑色和粗體。CSS選擇的狀態
<li class="selected"><a href="/health-coaching.html">Health Coaching</a></li>
幫助!感謝
您可以使用此:
.selected a:active
{
color: black;
font-weight: bold;
}
要aplly相同的設置上空盤旋時,使用此:
.selected a:hover
{
color: black;
font-weight: bold;
}
嘗試:
.selected a {
color: #000;
font-weight: bold;
}
使用此
li.selected a {
font-weight: bold;
color: #000;
}