如何从Google新iframe中删除Google Web Elements?

时间:2014-06-27 12:14:34

标签: javascript iframe cross-domain google-news

如何从iframe的Google新闻中删除Google Web Elements。

<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>

1 个答案:

答案 0 :(得分:0)

使用div作为包装,然后使用position: relative;,将position: absolute;设置为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;
}