单击按钮时如何更改按钮的Css类 [英] How to change the Css class for a button when the button is clicked
本文介绍了单击按钮时如何更改按钮的Css类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我的.aspx页面中有一个按钮的css类,我想在点击按钮时更改按钮的cssclass
。btnmbl1
{
font-weight:bold;
字体大小:15px;
颜色:黑色;
font-family:Calibri;
宽度:100px;
身高:70px;
border-style:none;
background-image:url(../ images / Button_Mobile_R2.gif);
}
.btnmbl1:focus,.btnmbl1:hover
{
background-image:url(../ images / Button_Mobile_R2_1.gif);
}
解决方案
检查这个小提琴 [ ^ ]
检查上面的小提琴。你会得到我希望的解决方案。
谢谢
:)
希望你能在这里得到你的问题的答案:
http://stackoverflow.com/questions/21739528/change -css-style-on-button-click [ ^ ]
谢谢。
hi all, i have a css class for a button in my .aspx page,i want to change cssclass for the button when it is clicked
.btnmbl1
{
font-weight: bold;
font-size: 15px;
color: Black;
font-family: Calibri;
width: 100px;
height: 70px;
border-style: none;
background-image: url(../images/Button_Mobile_R2.gif);
}
.btnmbl1:focus, .btnmbl1:hover
{
background-image: url(../images/Button_Mobile_R2_1.gif);
}
解决方案
check this fiddle [^]
check the above fiddle. You will get the solution I hope.
Thanks
:)
Hope you you will get answer for your question here:
http://stackoverflow.com/questions/21739528/change-css-style-on-button-click[^]
Thanks.
这篇关于单击按钮时如何更改按钮的Css类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文