Point one style class to another?

前端 未结 10 1381
遇见更好的自我
遇见更好的自我 2021-02-04 23:59

I have a css class like:

.foo {
  background-color: red;
}

then I have a class specified for a list:

.list1 li {
  background-c         


        
10条回答
  •  执念已碎
    2021-02-05 00:35

    to help clarify what is meant by overriding, if you want .list1 li to carry all the styles of foo, but just want to change it's color to tan, i would do this:

    
      
        TEXT WITH INHERITED STYLE GOES HERE
      
    
    

提交回复
热议问题