0

如何从 iframe 的谷歌新闻中删除谷歌网页元素。

<iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style="border:0;margin:0;width:275px;height:300px;" src="http://www.google.com/uds/modules/elements/newsshow/iframe.html?rsz=large&format=275x300&hl=en&q=google&element=true" scrolling="no" allowtransparency="true"></iframe>
4

1 回答 1

0

使用 div 作为包装器,position: relative;然后将 a 设置position: absolute;为 your iframe,并将负位置设置为左侧。

http://jsfiddle.net/3YX9f/

HTML:

<div class="frame-wrap">
    <iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style="border:0;margin:0;width:800px;height:300px;" src="http://www.google.com/uds/modules/elements/newsshow/iframe.html?rsz=large&format=275x300&hl=en&q=google&element=true" scrolling="no" allowtransparency="true" class="gnews"></iframe>
</div>

CSS:

.frame-wrap {
    position: relative;
}
.gnews {
    position: absolute;
    top:0;
    left: -172px;
}
于 2014-06-27T12:20:16.210 回答