Override body style for content in an iframe

前端 未结 10 1274
青春惊慌失措
青春惊慌失措 2020-11-22 01:10

How can I control the background image and colour of a body element within an iframe? Note, the embedded body element has a class, and the iframe i

10条回答
  •  [愿得一人]
    2020-11-22 01:39

    An iframe has another scope, so you can't access it to style or to change its content with javascript.

    It's basically "another page".

    The only thing you can do is to edit its own CSS, because with your global CSS you can't do anything.

提交回复
热议问题