Using CSS to affect div style inside iframe

前端 未结 13 1704
失恋的感觉
失恋的感觉 2020-11-22 07:00

Is it possible to change styles of a div that resides inside an iframe on the page using CSS only?

13条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 07:22

    Not possible from client side . A javascript error will be raised "Error: Permission denied to access property "document"" since the Iframe is not part of your domaine. The only solution is to fetch the page from the server side code and change the needed CSS.

提交回复
热议问题