我已经创建了一个小网站(它可能会保持离线),以使一些事情更容易。我创建了一个带有链接的热吧,这样我就可以更容易地导航到重要的站点。
问题是:
为了让google进入网页,我不得不使用一个代理(我使用了hidemyass),因为google阻止了iframes的使用,但是由于代理站点在您打开的每个页面的顶部都有一个巨大的横幅,所以我使用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>发布于 2013-09-27 21:32:03
由于明显的安全原因,不能更改iframe的父级内容。
https://stackoverflow.com/questions/19060355
复制相似问题