How to write :hover condition for a:before and a:after?

后端 未结 7 1611
北恋
北恋 2020-11-22 13:08

How to write :hover and :visited condition for a:before?

I\'m trying a:before:hover but it\'s not working

相关标签:
7条回答
  • 2020-11-22 13:32

    To change menu link's text on mouseover. (Different language text on hover) here is the

    jsfiddle example

    html:

    <a align="center" href="#"><span>kannada</span></a>
    

    css:

    span {
        font-size:12px;
    }
    a {
        color:green;
    }
    a:hover span {
        display:none;
    }
    a:hover:before {
        color:red;
        font-size:24px;
        content:"ಕನ್ನಡ";
    }
    
    0 讨论(0)
提交回复
热议问题