我想使用 iframe 在我的网站中显示页面内容,但我想“剪掉”页面的标题(顶部)部分,省去它的导航栏,这样用户只能看到下面的内容
代码:
<div id="content">
<div style="height:800px;">
<iframe id="optomaFeed" src="http://www.optomausa.com/company/press-releases/" scrolling="auto"
frameborder="0" height="100%" width="100%"></iframe>
</div>
</div>
我可以通过哪些方式来做到这一点? Tyvm~
最佳答案
我想出了如何使用 css clip
属性来做到这一点:
<div id="content">
<div style="height:800px;">
<iframe id="optomaFeed" src="http://www.optomausa.com/company/press-releases/" scrolling="no"
frameborder="0" height="100%" width="100%" style="position:absolute; clip:rect(190px,1100px,800px,250px);
top:-160px; left:-160px;"></iframe>
</div>
</div>
关于html - 剪掉部分iframe的src内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7183192/