按钮鼠标悬停问题 [英] button mouse hover issue
问题描述
Hii我正在实现按钮鼠标悬停,但我正面临一个问题
这里我声明了如下按钮。
< pre lang =vb>< asp:按钮ID = Button14 runat = server Text = 单一公司分析 CssClass = 按钮
OnClick = btnsinglecomapny_Click CommandArgument = 单个 BackColor = #0082AA ForeColor = #ffffff />
和鼠标悬停声明这样
# Button14:悬停
{
background-color : 红色;
}
i试图默认使用css和CSS声明背景颜色
当我从.aspx中删除背面颜色时在按钮中,悬停正在工作,其他方面它不起作用。
默认情况下如何声明按钮背景颜色。
请分享任何想法给我
如果您在按钮上调用JavaScript函数,请单击您需要编写的内容:
OnClientClick =btnsinglecomapny_Click()
你好
在你的css文件中使用你的背景色,然后你也可以设置悬停:
。按钮
{
background-color : #0082AA;
}
。按钮:悬停
{
background-color < span class =code-keyword>: 红色;
}
我不明白猜测该怎么办的问题。它可能类似于:# Button14 { background-color : 黄色; }
# Button14:悬停 { background-color : 红色; }我错过了什么吗? :-)
-SA
Hii i am implementing button mouse hover but i am facing an issue
here i am declare button like the below.
<asp:Button ID="Button14" runat="server" Text="Single Company Analysis" CssClass="button"
OnClick="btnsinglecomapny_Click" CommandArgument="Single" BackColor="#0082AA" ForeColor="#ffffff" />
and mouse hover declared like this
#Button14:hover
{
background-color:Red;
}
i tried to declare the backcolor by default using css and.cs
when i am remove the back color from the .aspx in button the hover is working other wise it's not working.
how to declare button backcolor by default.
please share any idea to me
If you are calling JavaScript function on button click the you need to write:
OnClientClick="btnsinglecomapny_Click()"
hello
use your back color in your css file,and then you can set the hover too :
.button { background-color:#0082AA; } .button:hover { background-color:Red; }
I don't understand what was the problem to guess what to do. It could be something like:#Button14 { background-color:Yellow; } #Button14:hover { background-color:Red; }Am I missing anything? :-)
—SA
这篇关于按钮鼠标悬停问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!