奶头挺立呻吟高潮av全片,成人试看120秒体验区,性欧美极品v,A片高潮抽搐揉捏奶头视频

網頁設計

頁腳始終保持在頁面底部的網頁布局方法

時間:2025-05-02 08:18:10 網頁設計 我要投稿
  • 相關推薦

頁腳始終保持在頁面底部的網頁布局方法

  導語:用CSS創建一個高度自適應布局,如何保證頁腳(footer)在內容不超過一屏的情況下始終保持在布局最下方是一個比較頭疼的事。下面就由百分網小編為大家介紹一下頁腳始終保持在頁面底部的網頁布局方法,希望對大家能有所幫助。

  步驟:

  1、為了讓瀏覽器識別高度100%我們需要先給 html 和 body 加上一個高度值,同時清除所有元素的 margin 和 padding。順便提一下,經過我的測試,html 和 body 的 height: 100%; 等于整個瀏覽器窗口的總高度,無論內容是否超過一屏。而它們下一級子元素 height: 100%; 則等于第一屏的高度。如何,是不是有點不好理解?

  * {

  margin: 0;

  padding: 0;

  }

  html, body {

  height: 100%;

  }

  2、因為上面提到的問題,所以為了讓布局自適應高度,我們要加上 min-height: 100%;,雖然IE不支持這個屬性但是IE的 height: 100%; 有同樣的作用:

  #wrapper {

  min-height: 100%;

  }

  * html #wrapper {

  height: 100%;

  }

  這樣,一個最簡單的最小高度滿一屏的自適應布局就做好了。為了便于查看,我加了一些寬度和背景色修飾,如下:

  * {

  margin: 0;

  padding: 0;

  }

  html, body {

  height: 100%;

  text-align: center;

  font: 12px/1.4 Verdana, sans-serif;

  background: #f00;

  }

  #wrapper {

  width: 770px;

  min-height: 100%;

  background: #ccc;

  margin: auto;

  text-align: left;

  }

  * html #wrapper {

  height: 100%;

  }

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

  <html xmlns="http://www.w3.org/1999/xhtml">

  <head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>jzxue.com-建站學</title>

  <style type="text/css">

  /*<![CDATA[*/

  * {

  margin: 0;

  padding: 0;

  }

  html, body {

  height: 100%;

  text-align: center;

  font: 12px/1.4 Verdana, sans-serif;

  background: #F00;

  }

  #wrapper {

  width: 770px;

  min-height: 100%;

  background: #ccc;

  margin: auto;

  text-align: left;

  }

  * html #wrapper {

  height: 100%;

  }

  #header {

  background: Green;

  height: 40px;

  }

  #sidebar {

  float: left;

  width: 200px;

  background: Gray;

  }

  #content-box {

  float: right;

  width: 570px;

  background: Olive;

  }

  #footer {

  height: 50px;

  background: Background;

  width:770px;

  margin: auto;

  }

  /*]]>*/

  </style>

  </head>

  <body>

  <p id="wrapper">

  <p id="header">此處顯示  id "header" 的內容</p>

  <p id="content-box">此處顯示  id "content-box" 的內容</p>

  <p id="sidebar">此處顯示  id "sidebar" 的內容</p>

  </p>

  <p id="footer">此處顯示  id "footer" 的內容</p>

  </body>

  </html>

【頁腳始終保持在頁面底部的網頁布局方法】相關文章:

網頁設計布局方法11-10

網頁設計中防止頁面被撐開的方法06-16

wps文字如何布局頁面07-13

網站制作頁腳如何自適應布局11-12

交互頁面網頁設計07-19

網頁布局方式07-16

網頁的排版與布局08-26

網頁布局基礎08-10

網頁設計的布局08-13

主站蜘蛛池模板: 赣州市| 吉林省| 沙田区| 城固县| 治县。| 景德镇市| 互助| 老河口市| 汾阳市| 黔西县| 泽州县| 岑溪市| 红桥区| 长乐市| 资阳市| 板桥市| 长兴县| 洪湖市| 南川市| 台东市| 马鞍山市| 广饶县| 中卫市| 临汾市| 永定县| 鄢陵县| 广宁县| 石景山区| 金山区| 邹平县| 湛江市| 成都市| 台江县| 攀枝花市| 若羌县| 九龙城区| 宜良县| 墨竹工卡县| 杭锦后旗| 海伦市| 定日县|