【发布时间】:2010-12-02 21:27:20
【问题描述】:
我有一个 asp 按钮控件,我在上面应用了一些样式。我希望在此按钮悬停时,按钮的颜色应该改变或类似的东西。 但我不明白为什么在 CSS 中按钮悬停功能不起作用! 请帮忙。另外请让我知道按钮悬停的最佳效果是什么。
<asp:Button ID="btnSearch" runat="server" CssClass="button" OnClick="btnSearch_Click" Style="width: 480px;" Text="Search" />
.button
{
background: white;
border: solid 1px grey;
font-family: Arial, sans-serif;
font-size: 12px;
font-weight: bold;
color: #001563;
height: 25px;
}
.button:hover
{
background: white;
border: solid 1px grey;
font-family: Arial, sans-serif;
font-size: 12px;
font-weight: bold;
color: Red;
height: 25px;
}
【问题讨论】:
-
你在每个浏览器或 IE 中都能看到这个?