且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

悬停在按钮上的文字颜色会发生变化

更新时间:2023-01-27 18:59:42

The CSS property color controls the text color in elements generically. In your case, to change the color on hover, use the :hover specifier;

input[type = "submit"]:hover {
    color: #FF0000;
    //you can add more styles to be applied on hover
}

Note that you can as well specify the color using the rgb(x, y, z) format. Here's a little demo to illustrate: little link. You can play around with the demo and view the source here: another little link.

I hope that helped!

相关阅读

技术问答最新文章