Using CSS to affect div style inside iframe

前端 未结 13 1543
失恋的感觉
失恋的感觉 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 07:22

    The quick answer is: No, sorry.

    It's not possible using just CSS. You basically need to have control over the iframe content in order to style it. There are methods using javascript or your web language of choice (which I've read a little about, but am not to familiar with myself) to insert some needed styles dynamically, but you would need direct control over the iframe content, which it sounds like you do not have.

提交回复
热议问题