从上图中可以看出,除了注销外,所有标签都是使用li创建的。它使用asp:label。我试图改变CSS样式,以便它可以匹配其他的,但它们不起作用。 以下是注销的编码。
.logout {
color: #000000;
display: block;
font: bold 13px/24px Times, "Times New Roman", serif;
text-decoration: none;
text-shadow: 1px 1px #000;
text-transform: uppercase;
font-size: small;
font-family: Arial, Helvetica, sans-serif;
}
.navigation {
float: right;
list-style: none;
margin: 28px 0 0;
padding: 0;
}
.navigation li {
float: left;
margin-left: 30px;
position: relative;
color: #000000;
height: 20px;
}
.navigation li > a {
color: #000000;
font: bold 13px/24px Times, "Times New Roman", serif;
text-decoration: none;
text-shadow: 1px 1px #000;
text-transform: uppercase;
font-size: small;
font-family: Arial, Helvetica, sans-serif;
}
.navigation li.active > a,
.navigation > a:hover {
color: #0000FF;
font-size: small;
font-family: Arial, Helvetica, sans-serif;
}
.navigation li > div {
background-color: #888888;
display: none;
width: 110px;
position: absolute;
z-index: 1;
left: 0px;
top: 24px;
}
.navigation li:hover > div {
display: block;
}
.navigation li > div a {
color: #b8c6ac;
font: bold 13px/24px"Times New Roman", Times, serif;
display: block;
text-align: center;
text-decoration: none;
text-shadow: none;
}
.navigation li > div a:hover {
color: #fff;
}
<ul class="navigation">
<li>
<a href="loginmain.aspx">Home</a>
</li>
<li id="sbooking" runat="server">
<a href="booking.aspx">Booking</a>
</li>
<li>
<a href="fac l.aspx">Facilities</a>
</li>
<li class="active">
<a href="ser l.aspx">Services</a>
</li>
<li>
<a href="account.aspx">Account</a>
</li>
<li class="slogout" runat="server">
<asp:Label runat="server" OnClick="return confirm('Are you certain you want to logout?');" CssClass="logout"><a href="index.aspx">LogOut</a>
</asp:Label>
</li>
</ul>
</div>
</div>
如果需要更多细节,我会更新。
答案 0 :(得分:0)
您可以尝试将css更改为:
.logout a{
color: #000000;
display: block;
font: bold 13px/24px Times, "Times New Roman", serif;
text-decoration: none;
text-shadow: 1px 1px #000;
text-transform: uppercase;
font-size: small;
font-family: Arial, Helvetica, sans-serif;
}