开发者

How can I crop the content of an IFrame (from the IFrame container, without using scrolling)

I would like to have a negative inner padding / margin (not to affect scrolling) for an IFrame using some JS / CSS (from outside of the IFrame) is that even possible?

Ex开发者_高级运维planation: the content of the IFrame has a header that I would like to "hide", one option is to control the scrolling, but this will allow users to scroll back and see it, another option is "cropping" the content

Just like positive padding or margin will make any content away from the border, only the other way...


You can't modify iframe content with css from the outside. If the iframe content is on the same domain, you could write a javascript that enters the iframe and removed the unwanted content. If the iframe is crossdomain you're out of luck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜