在顯示某些網站內的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