how to alias class name in css or sass

后端 未结 6 1998
青春惊慌失措
青春惊慌失措 2020-12-09 07:15

Can I create an alias to a css class?

I am using this font-awesome and I am trying to create an alias name for some of the icon classes. So that .icon-globe

6条回答
  •  独厮守ぢ
    2020-12-09 08:01

    You can apply the same styles to several classes using plain css comma separated selectors:

    .icon-globe, .globe {
      //styles
    }
    

    Will apply the same styles to and .

提交回复
热议问题