0

我创建了一个小网站(可能会保持离线状态)以使一些事情变得更容易。我创建了一个带有链接的快捷栏,这样我就可以更轻松地导航到重要站点。

问题是:

要将 iframe google 到网页中,我必须使用代理(我使用 hidemyass),因为 google 阻止使用 iframe,但是因为代理站点在您通过它打开的每个页面顶部都有一个巨大的横幅,所以我将内容移到了iframe 在 CSS 中使用顶部边距。

所以横幅仍然存在,但你看不到它,但现在每当我在同一个 iframe 中打开没有任何横幅的任何其他网站时,它都会隐藏网站的一部分,我不想要这个。

那么如何让它隐藏代理页面顶部的横幅并仍然完全显示任何其他页面?我试图给 div 和 iframe 2 命名,以便我可以制作 2 个 CSS 语句,但这不起作用。这是代码:

#frame1 {
    position:fixed !important;
    position:absolute;
    top:0%;
    right:0%;
    bottom:0%;
    left:8%;
    overflow: hidden;
}

body {
background-color: black
}

#frame2 {
width: 100%;
height: 131%;
    margin-top: -18.5%;
}


<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="school/bronnen/css/main.css">
<meta charset="UTF-8">
<title>Bronnen</title>
</head>
<body>
    <br>
a href="http://2.hidemyass.com/ip-1/encoded/czovL3d3dy5nb29nbGUuY29tLw%3D%3D" target="frame2"><img src="school/bronnen/pics/google.jpg" alt="google" width="7%" height="auto"></a>
<br>
<a href="http://1.hidemyass.com/ip-5/encoded/czovL2dpdGh1Yi5jb20v" target="frame2"><img src="school/bronnen/pics/github.png" alt="github" width="7%" height="auto"></a>
<br>
<a href="http://www.awwwards.com" target="frame2"><img src="school/bronnen/pics/awwards.png" alt="awwards" width="7%" height="auto"></a>
<br>
<a href="https://7.hidemyass.com/ip-1/encoded/czovL3d3dy5kcm9wYm94LmNvbS8%3D" target="frame2"><img src="school/bronnen/pics/dropbox.jpg" alt="dropbox" width="7%" height="auto"></a>
<br>
<a href="http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/the-best-way-to-learn-css-2/" target="frame2"><img src="school/bronnen/pics/activetuts.png" alt="activetuts" width="7%" height="auto"></a>
<br>
<a href="https://7.hidemyass.com/ip-1/encoded/Oi8vc3RhY2tvdmVyZmxvdy5jb20v" target="frame2"><img src="school/bronnen/pics/stackoverflow.jpg" alt="stackoverflow" width="7%" height="auto"></a>
<div name="frame1" id="frame1"><iframe src="school/bronnen/iframe/iframe.html" name="frame2" id="frame2" frameborder="1" scrolling="auto"></iframe></div>
<br>
<a href="http://player.highstrike.org/play/" target="frame2"><img src="school/bronnen/pics/dubstep.jpg" alt="dubstep" width="7%" height="auto"></a>
<br>
<a href="http://www.codecademy.com/learn" target="frame2"><img src="school/bronnen/pics/codecademy.png" width="7%" height="auto" alt=""></a>
<br>
<a href="http://www.youtube.nl" target="frame2"><img src="school/bronnen/pics/youtube.png" alt="youtube" width="7%" height="auto"></a>
<br>
<a href="http://www.facebook.com" target="frame2"><img src="school/bronnen/pics/facebook.png" alt="facebook" width="7%" height="auto"></a>
<br>
<a href="http://tpb.peterbishop.net/" target="frame2"><img src="school/bronnen/pics/piratebay.jpg" alt="piratebay" width="7%" height="auto"></a>
<br>
<a href="http://www.twitter.com" target="frame2"><img src="school/bronnen/pics/twitter.png" alt="twitter" width="7%" height="auto"></a>
</table>

4

1 回答 1

0

出于明显的安全原因,您不能更改iframe其父级的内容

于 2013-09-27T21:32:03.153 回答