Add CSS to react created elements like data-reactroot

前端 未结 3 1114
时光说笑
时光说笑 2021-02-04 01:28

Under my root div react creates another div \"automatically\". Is there a way to add a class to that div? I need to add height: 100% to it to prevent the background content to s

3条回答
  •  逝去的感伤
    2021-02-04 01:49

    #root > [data-reactroot] { height: 100% } in your CSS should work.

    Or just the tag itself:

    [data-reactroot] { ... }
    

提交回复
热议问题