我該如何使iframe和iframe dom元素使用iframe作爲themeforest.com。 這裏是網站的參考。看看頂部的黑線。整個網站都在它下面加載。如何製作和iframe像themeforest.com預覽
http://themeforest.net/item/focus-simple-one-page-template-2/full_screen_preview/236868
我該如何使iframe和iframe dom元素使用iframe作爲themeforest.com。 這裏是網站的參考。看看頂部的黑線。整個網站都在它下面加載。如何製作和iframe像themeforest.com預覽
http://themeforest.net/item/focus-simple-one-page-template-2/full_screen_preview/236868
如果你正在尋找有一個iframe
填滿整個網頁,你可以只是簡單的iframe
元素的寬度和高度與CSS
設置爲100%。
下面是一些示例代碼演示這樣的想法:
HTML
<div id="header">
Header
</div>
<iframe src="https://developer.mozilla.org/en/XUL/iframe">
</iframe>
CSS
iframe {
width: 100%;
height: 100%;
padding: 0em;
margin: 0em;
border: 0em;
}
#header {
background-color: #00AA00;
font-family: sans-serif;
text-align: center;
line-height: 2em;
font-family: bold;
}
這段代碼的工作示例位於該JS小提琴:http://jsfiddle.net/mq4Rf/7/。
嗨,這個作品,但問題仍然是一樣的。他們是多個垂直滾動條。我只想要一個與iframe。 – 2011-05-28 16:37:42
yessss我知道了..我打開一個身體選擇器標記體{overflow:hidden;}它工作..........多數民衆贊成在多數:) – 2011-05-28 16:44:16
你的歡迎!我很高興我能幫上忙! – 2011-05-28 16:55:33
請原諒。該代碼修復* iframe *的高度。你的問題是關於iframe的高度('我如何製作iframe')? – sergzach 2011-05-28 14:37:29
看我在JavaScript中是noob ..我在努力學習..你能幫我把這個目標歸檔嗎? ,引用是themeforest.com預覽頁面.. – 2011-05-28 15:07:36
但是不清楚你想要做什麼...請具體說明你想要什麼。如果你只是說,*我希望它看起來像這樣*,我們無法幫助你,因爲我們不知道你的網站是關於什麼,它是什麼*等等。你想知道關於iframe的具體內容? – 2011-05-28 15:22:33