How to apply css class to a component element when it's created by router-outlet?

前端 未结 11 1447
南旧
南旧 2020-12-15 15:41

I have DOM that looks something like this:


    
    ...

         


        
11条回答
  •  天命终不由人
    2020-12-15 16:00

    use the adjacent sibling selector and the * wildcard to select the element immediately following the router-outlet


    styles.css

    router-outlet + * {
      /* your css */
    }
    

提交回复
热议问题