How to reuse css class content in another class without copying?

前端 未结 8 1049
北恋
北恋 2021-02-18 14:07

Is it possible to use existing css class as content in another class ?

I mean something like:

Contained in some library:
.class1 { text-indent: 100 }

 I         


        
8条回答
  •  无人及你
    2021-02-18 14:34

    You can define 2 classes in this way

    .class1, .class2 { text-indent: 100 }
    

    And it will work for you

    Moreover if you want to ad some more in class2 then you can define it

    .class2 { /*whatever you want here*/ }
    

提交回复
热议问题