如何将 css 样式设置为 asp.net 按钮? [英] How to set css style to asp.net button?
本文介绍了如何将 css 样式设置为 asp.net 按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 asp:Button,我在 asp:Button
中使用了带有 cssClass 属性的 css 样式,但是这些样式不起作用.当我使用 asp:LinkButton
时,这些样式运行良好.我不想要任何样式的主题或皮肤.
I have a asp:Button, I used css styles with cssClass property in asp:Button
, but those styles are not working. When I use asp:LinkButton
those styles are working well.I don't want any themes or skins for styles.
这是我的asp页面:
<asp:Button CssClass="smallButton" Text="Sign In" runat="server" ID="submit"></asp:Button>
这是我的 CSS:
.smallButton
{
//styles
}
当我将 asp:Button 更改为 asp:LinkButton
When I change asp:Button to asp:LinkButton
<asp:LinkButton Text="Sign In" runat="server" ID="submit" CssClass="smallButton"></asp:LinkButton>
或
<span class="smallButton"><asp:LinkButton Text="Sign In" runat="server" ID="submit"></asp:LinkButton></span>
样式运行良好.唯一的问题是 asp:Button 控件
styles are working well. Only problem with the asp:Button control
推荐答案
我找到了编码...
input[type="submit"]
{
//css coding
}
input[type="submit"]:Hover
{
//css coding
}
这是我的问题的解决方案.....感谢大家的宝贵回答......
This is the solution for my issue..... Thanks everyone for the valuable answers.......
这篇关于如何将 css 样式设置为 asp.net 按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文