Text color change on hover over button

后端 未结 4 675
我寻月下人不归
我寻月下人不归 2021-01-12 04:29

I am trying to change the color of the text inside the button on hover.

I can make the button itself change color, but I want the button text to change color too.

4条回答
  •  一整个雨季
    2021-01-12 05:06

    p.one{
        color: DarkBlue}
    p.one:hover{
        color: yellow}
    
        
            Css Help
        
        
            

    Example TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample TextExample Text

    Here is what I do:

    a:hover{
        color: #ffffff;
    }
    

    You can change the 'a' to whatever such as a paragraph 'p' or specify it the html file with a class

    Example

    Them in CSS file do:

    p.one:hover{
        color: #ffffff;
    }
    

    I hope I could Help.

提交回复
热议问题