Override body style for content in an iframe

前端 未结 10 1265
青春惊慌失措
青春惊慌失措 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:30

    You cannot change the style of a page displayed in an iframe unless you have direct access and therefore ownership of the source html and/or css files.

    This is to stop XSS (Cross Site Scripting)

提交回复
热议问题