reset multiple css styles for one single div element

前端 未结 3 1356
心在旅途
心在旅途 2020-12-29 09:09

my question is if it is possible to reset css styles (a lot off them) for a single div and all elements that are contained in that div.

I am asking, because I found

3条回答
  •  不知归路
    2020-12-29 09:40

    As mentioned previously @Noldorin, you want a selector that selects all descendants (or children) using the universal selector.

    For more info on selectors, check out W3C's documentation. CSS2 selector info is here

    Example code (i've chosen to use a selector by ID as opposed to class) to illustrate:

    
    
    
    CSS Reset
    
    
    
    
    

    With Descendant Reset Style

    Red

    GreenBlue

    With Child Reset Style

    Red

    GreenBlue

    Without Reset Style

    Red

    GreenBlue

提交回复
热议问题