我離開這個默認的CSS文件的網站重新鼠標懸停在日誌上的鏈接
.hover a
{
background-color:Gray;
text-decoration:none;
}
.hover a:hover
{
background-color:Red;
color:White;
}
和_LogonPartial.cshtml
@if(Request.IsAuthenticated) {
<text>Welcome <strong>@User.Identity.Name</strong>!
[ @Html.ActionLink("Log Off", "LogOff", "Account") ]</text>
}
else {
@Html.ActionLink("Log On", "LogOn", "Account", new { @class="hover"})
}
只有類hover->一個是有效的,我也很奇怪爲什麼當我的鼠標在Log On鏈接上時,URL會添加「?length = 7」,那是什麼?
不知道它的有意或無意(和它沒有解決任何方式你的問題),但你只能申請懸停類的「登錄」鏈接,而不是「註銷」鏈接。 – 2012-02-17 17:42:43