Is it possible to change between two fontawesome icons on hover?

后端 未结 6 1283
情书的邮戳
情书的邮戳 2020-12-05 00:52

I have an anchor tag with a font-awesome icon as follows


6条回答
  •  盖世英雄少女心
    2020-12-05 01:23

    If you are using SCSS, you could simply do this. Much lightweight than any of the JS solutions and lighter on the DOM.

    .icon-unlock:hover {
      @extend .icon-lock;
    }
    

提交回复
热议问题