悬停有效,但仅适用于按钮图像的某些部分或按钮图像外部。此外,如果箭头从上方进入按钮,则悬停不起作用。
有什么想法吗?
.buttonSearch{
display: block;
background: url("../Images/btn Search.JPG") no-repeat top;
height: 40px;
width:100px;
border:1px solid #7AB800;
border-width:0px;
margin-left: 210px;}
.buttonSearch:hover
{display: block;
background: transparent url("../Images/btn Search Click2.JPG") no-repeat top;
height: 40px;
width:100px;
border:none 0 transparent;
border-width:0px;
margin-left: 210px;
ASP页面:
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<asp:Panel ID="p" runat="server" DefaultButton="butName">
<br />
<br />
<asp:Label ID="TextBox1" runat="server" AutoComplete="Off" CssClass="display-labelsearch" Text="Last Name: " />
<asp:TextBox ID="txtName" runat="server" CssClass="display-fieldsearch" MaxLength="100" ToolTip="Please enter a Provider last name."></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="txtName_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtName" WatermarkText="Type Last Name Here" WatermarkCssClass="watermarked">
</cc1:TextBoxWatermarkExtender>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
TargetControlID="txtName" MinimumPrefixLength="1" ServiceMethod="GetNames"
UseContextKey="True">
</cc1:AutoCompleteExtender>
</asp:Panel>
<asp:Button ID="butName" runat="server" onclick="tbSearchbutton" CssClass="buttonSearch" />
<asp:GridView ID="gvProvLookup" runat="server"
AutoGenerateColumns =“False”OnRowCommand =“ViewProv_RowCommand”yada yada
答案 0 :(得分:0)
有些东西覆盖了按钮的一部分。我把它移动了一行,它运行正常。