我知道這個問題已經在這裏問過,我已經做了一些Google搜索,看看我能否得到它的工作,但我發現的解決方案根本不適合我。 這裏是我的代碼CSS a:活動僞類不工作
<div id="rightbar" class="float-r">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody><tr>
<td colspan="2"><a class="block active" href="dashboard.php">My Dashboard</a></td>
</tr>
<tr>
<td><a class="block" href="profile.php">My Profile</a></td>
</tr>
<tr>
<td><a class="block" href="edit_profile.php">Edit Personal Details Form</a></td>
</tr>
<tr>
<td><a class="block" href="edit_form.php">Edit Members Form</a></td>
</tr>
<tr>
<td colspan="2" class="last-child"><a style="border-bottom:solid 1px #eaeaea;width:235px;" class="block" href="logout.php">Log Out</a></td>
</tr>
</tbody></table>
</div>
.float-r {
float: right;
}
#rightbar {
background: #ffffff;
float: right;
width: 250px;
margin-top: 10px;
height: 530px;
margin-right: 10px;
border-bottom: solid 1px #c8c9c9;
}
#rightbar a {
width:235px;
color: #000;
font-size:14px;
text-decoration:none;
}
#rightbar a:hover{
background-color:#efefef;
width:235px;
}
#rightbar a:active{
background-color:#eaeaea;
width:235px;
}
我想,當我點擊一個鏈接,懸停在了它的一個背景:主動要改變,如果你滾動,你會看到這樣問題的選項頂部就拿#1這裏,標籤,用戶,徽章,如果我點擊每個鏈接的背景更改爲橙色。我想要那樣的東西。謝謝。
你在用什麼切換主動? – ajmajmajma
一切似乎都奏效。你認爲什麼不按預期工作? – nicael
您是否嘗試過#rightbar table tbody tr td a:hover { background-color:#efefef; width:235px; } –