欧美日韩不卡一区二区三区,www.蜜臀.com,高清国产一区二区三区四区五区,欧美日韩三级视频,欧美性综合,精品国产91久久久久久,99a精品视频在线观看

效果

如何使用CSS構建iframe效果

時間:2021-06-20 14:58:21 效果 我要投稿

如何使用CSS構建iframe效果

  iframe應用很普遍,通常的需求有兩種:

  1,獲取iframe效果,就是帶一個滾動條,可以省不少版面。

  2,要嵌一個頁面,實現(xiàn)框架鏈接。

  如果不方便使用iframe,可以有如下解決方案:

  第一種需求如果我們使用CSS布局來實現(xiàn),即可以少一個頁面,也可以提高效率。

  第二種需求可以采用xmlhttp遠程獲取。

  A.直接模擬iframe

  用層做容器

  復制代碼 代碼如下:

  #content{overflow:auto;height:200px;width:600px;background:#f00;}

  用CSS構建iframe效果 - Css Iframe - RexSong.com * { font:12px Arial;} html { overflow:hidden; border:0; height:100%;} body { overflow:hidden; height:100%;} #content { overflow:auto; height:185px; width:600px; background:#ccc; padding:10px;} 用CSS構建iframe效果

  A. 直接模擬iframe,用層做容器

  ·僅用css編寫無限分級彈出菜單 ·瀏覽器滾動條的參數(shù)總結 ·引入css樣式表的四種方式介紹 ·兩種方式實現(xiàn)的文字豎排效果 ·網(wǎng)頁設計高級布局40例參考 ·從GMail認識W3C標準和Ajax

  [Ctrl+A 全選 注:如需引入外部Js需刷新才能執(zhí)行]

  用body做容器

  復制代碼 代碼如下:html{overflow:hidden;height:100%;background:#fff;border:0;}

  *html{padding:100px00100px;}

  body{overflow:scroll;background:#f00;margin:0;position:absolute;top:100px;left:100px;bottom:0;right:0;}

  *htmlbody{height:100%;width:100%;}

  用CSS構建iframe效果 - Css Iframe - RexSong.com * { font:12px Arial;} html { overflow:hidden; height:100%; background:#fff; border:0;} * html { padding:200px 0 0 100px;} body { overflow:auto; background:#ccc; margin:0; position:absolute; top:200px; left:100px; bottom:0; right:0;} * html body { height:100%; width:100%; position:static;} #info { position:fixed; top:10px; left:10px;} * html #info { position:absolute;} 用CSS構建iframe效果

  A. 直接模擬iframe,用body做容器

  ·僅用css編寫無限分級彈出菜單 ·瀏覽器滾動條的參數(shù)總結 ·引入css樣式表的'四種方式介紹 ·兩種方式實現(xiàn)的文字豎排效果 ·網(wǎng)頁設計高級布局40例參考 ·從GMail認識W3C標準和Ajax

  [Ctrl+A 全選 注:如需引入外部Js需刷新才能執(zhí)行]

  B.絕對定位模擬iframe

  滾動條在外邊

  復制代碼 代碼如下:html{overflow:hidden;border:0;height:100%;max-height:100%;}

  body{overflow:hidden;margin:0;height:100%;max-height:100%;position:relative;}

  #head{position:absolute;top:0;right:15px;width:100%;height:100px;background:#f00;z-index:2;}

  #foot{position:absolute;bottom:0;right:15px;width:100%;background:#f00;height:50px;z-index:2;}

  #content{height:100%;position:relative;z-index:1;overflow:auto;}

  效果演示源代碼:

  用CSS構建iframe效果 - Css Iframe - RexSong.com * { font:12px Arial;} html { overflow:hidden; border:0; height:100%;} body { overflow:hidden; margin:0; height:100%; position:relative;} #content { height:100%; position:relative; z-index:1; overflow:auto;} #head { position:absolute; top:0; right:16px; width:100%; height:100px; background:#ccc; z-index:2;} #foot { position:absolute; bottom:0; right:16px; width:100%; background:#ccc; height:50px;z-index:2;} 用CSS構建iframe效果

  B. 絕對定位模擬iframe,滾動條在外邊

  ·僅用css編寫無限分級彈出菜單 ·瀏覽器滾動條的參數(shù)總結 ·引入css樣式表的四種方式介紹 ·兩種方式實現(xiàn)的文字豎排效果 ·網(wǎng)頁設計高級布局40例參考 ·從GMail認識W3C標準和Ajax

  [Ctrl+A 全選 注:如需引入外部Js需刷新才能執(zhí)行]

  滾動條在里邊

  復制代碼 代碼如下:

  html{height:100%;max-height:100%;border:0;overflow:hidden;}

  *html{padding:100px050px0;}

  body{height:100%;max-height:100%;margin:0;overflow:hidden;}

  #content{position:absolute;top:100px;bottom:50px;left:0;right:0;z-index:3;width:100%;overflow:auto;}

  *html#content{top:100px;bottom:0;height:100%;}

  #head{position:absolute;margin:0;top:0;left:0;width:100%;height:100px;background:#f00;z-index:5;}

  #foot{position:absolute;margin:0;bottom:0;left:0;width:100%;height:50px;z-index:5;background:#f00;}

  用CSS構建iframe效果 - Css Iframe - RexSong.com * { font:12px Arial;} html { height:100%; max-height:100%; border:0; overflow:hidden;} * html { padding:100px 0 50px 0;} body { height:100%; max-height:100%; margin:0; overflow:hidden;} #content { position:absolute; top:100px; bottom:50px; left:0; right:0; z-index:3; width:100%; overflow:auto;} * html #content { top:100px; bottom:0; height:100%;} #head { position:absolute; margin:0; top:0; left:0; width:100%; height:100px; background:#ccc; z-index:5;} #foot { position:absolute; margin:0; bottom:0; left:0; width:100%; height:50px; z-index:5; background:#ccc;} 用CSS構建iframe效果

  B. 絕對定位模擬iframe,滾動條在里邊

  ·僅用css編寫無限分級彈出菜單 ·瀏覽器滾動條的參數(shù)總結 ·引入css樣式表的四種方式介紹 ·兩種方式實現(xiàn)的文字豎排效果 ·網(wǎng)頁設計高級布局40例參考 ·從GMail認識W3C標準和Ajax

  [Ctrl+A 全選 注:如需引入外部Js需刷新才能執(zhí)行]

  在IE6.0和FF1.5環(huán)境下測試通過

【如何使用CSS構建iframe效果】相關文章:

使用CSS3來實現(xiàn)滾動視差效果的教程11-11

如何使用制作拼音效果06-22

CSS如何實現(xiàn)中英文雙語菜單效果代碼04-15

如何使用Flash制作寫字效果動畫10-01

如何使用Fireworks制作炫光效果10-31

如何使用催眠音樂獲得最佳效果06-23

如何使用FW自帶濾鏡打造動畫效果09-29

如何使用Fireworks制作紅墻磚頭效果10-02

如何使用photoshop處理出文藝效果10-16