在显示某些网站内的iframe时出现问题。 Live example of codeIframe不显示某些页面
这一个工程。
<article class='nobackground'>
<iframe src='http://en.wikipedia.org/wiki/<?php echo $myid ?>'></iframe>
</article>
这一个不显示。 (也不会YouTube,谷歌或Facebook,但静态html似乎显示效果细腻)使用
<article class='nobackground'>
<iframe src='http://www.google.ie/search?tbm=isch&hl=en&source=hp&biw=1280&bih=679&q=<?php echo $myid ?>'></iframe>
</article>
CSS:
iframe {
width: 100%;
height: 620px;
background: white;
border: 1px solid rgb(192, 192, 192);
margin: -1px;
}
article.fill iframe {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 0;
margin: 0;
border-radius: 10px;
-o-border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
z-index: -1;
}
请参阅[本文](http://stackoverflow.com/q/3838600/250517)X-Frame-Option标题的解释 – 2012-01-14 14:22:08
Erm ...你为什么要做一个'
'? _“这里没什么好看的,离开....”_ – Wrikken 2012-01-14 14:55:54