开发者

How to change font to bold when mouse hovers over asp.net button?

开发者 https://www.devze.com 2023-04-03 16:55 出处:网络
I have the following b开发者_运维问答utton in an ASP.NET page: <asp:Button ID=\"Button1\" Text=\"I AGREE\" runat=\"server\" />

I have the following b开发者_运维问答utton in an ASP.NET page:

<asp:Button ID="Button1" Text="I AGREE" runat="server" />

and want the text "I AGREE" to change to bold whenever the user hovers the mouse over the button. How can I do that?


add a css class to the button

CssClass="button-style"

then add a css class

.button-style:hover{
    font-weight: bold;
}

edit note the . now in .button-style:hover

0

精彩评论

暂无评论...
验证码 换一张
取 消