样式表
a:link {
font-size: 12px;
color: #003399;
text-decoration: none;
vertical-align: bottom;
background-color: #EEFBFF;
border: 1px solid #CEF4FF;
line-height: 18px;
}
a:visited {
font-size: 12px;
color: #003399;
text-decoration: none;
vertical-align: bottom;
background-color: #EEFBFF;
border: 1px solid #CEF4FF;
}
a:hover {
font-size: 12px;
color: #990000;
text-decoration: none;
vertical-align: bottom;
background-color: #F2E3E8;
border: 1px solid #D9ACBB;
}
不是C# 是样式
<style type="text/css">
<!--
a:link {
font-size: 12px;
color: #003399;
text-decoration: none;
vertical-align: bottom;
background-color: #EEFBFF;
border: 1px solid #CEF4FF;
line-height: 18px;
}
a:visited {
font-size: 12px;
color: #003399;
text-decoration: none;
vertical-align: bottom;
background-color: #EEFBFF;
border: 1px solid #CEF4FF;
}
a:hover {
font-size: 12px;
color: #990000;
text-decoration: none;
vertical-align: bottom;
background-color: #F2E3E8;
border: 1px solid #D9ACBB;
}
-->
</style>
去找本javascript的书看一下,用onmouseover和onclick就可以实现。
当然啦,要结合一点css的知识。
<asp:Button id="Button1" runat="server" Text="Button" onmouseover="this.style.backgroundColor='#B5E1FF'"></asp:Button>
你把这个放在页面里看看?