html - 剪掉部分iframe的src内容

标签 html css iframe

我想使用 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/

相关文章:

html - div 中多行文本的边框 (html/css)

javascript - 单击更改 iframe 元素的类

javascript - 像 hidemyass 这样的代理网站如何让 Google 在 iframe 中加载?

javascript - 如何创建直接链接以打开 Bootstrap 模式的 URL

javascript - 延迟显示 iframe 'preview' 弹出窗口

javascript - 即使在使用 javascript 重新加载后也保留滚动条位置

html - CSS On hover 缓和/淡入三 Angular 形

javascript - HTML、JavaScript : Get a value out of window. onclick 的函数

html - 媒体查询在 Blogger 中不起作用

javascript - facebook 未在 iframe 内加载