<p class="sycode"> 1 <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > 2 < html xmlns ="http://www.w3.org/1999/xhtml" > 3 < head > 4 < title > div + css左右高度自适应测试 </ title > 5 </ head > 6 < body > 7 < div class ="MainCenterDiv" > 8 < style type ="text/css" > 9 /* 左右高度自适应 Start */ 10 #Page 11 { 12 width : 960px ; 13 margin : 0 auto ; 14 overflow : hidden ; 15 } 16 #header 17 { 18 background : #000 ; 19 } 20 #PageLeft 21 { 22 width : 198px ; 23 float : left ; 24 text-align : left ; 25 border : solid 1px #ccc ; 26 background-color : #eee ; 27 } 28 #PageRight 29 { 30 width : 748px ; 31 float : left ; 32 text-align : left ; 33 margin-left : 10px ; 34 border : solid 1px #ccc ; 35 } 36 /* easy clearing */ 37 #Page:after 38 { 39 content : '[DO NOT LEAVE IT IS NOT REAL]' ; 40 display : block ; 41 height : 0 ; 42 clear : both ; 43 visibility : hidden ; 44 } 45 #Page 46 { 47 display : inline-block ; 48 } 49 /* \ */ 50 #Page 51 { 52 display : block ; 53 } 54 /* end easy clearing */ 55 /* \ */ 56 #PageLeft, #PageRight 57 { 58 padding-bottom : 32767px !important ; 59 margin-bottom : -32767px !important ; 60 } 61 @media all and (min-width: 0px) 62 { 63 #PageLeft, #PageRight 64 { 65 padding-bottom : 0 !important ; 66 margin-bottom : 0 !important ; 67 } 68 #PageLeft:before, #PageRight:before 69 { 70 content : '[DO NOT LEAVE IT IS NOT REAL]' ; 71 display : block ; 72 background : inherit ; 73 padding-top : 32767px !important ; 74 margin-bottom : -32767px !important ; 75 height : 0 ; 76 } 77 } 78 /* 补充底部border */ 79 div.BottomBorder { 80 width : 960px ; 81 margin : 0 auto ; 82 overflow : hidden ; 83 height : 1px ; 84 clear : both ; 85 } 86 div.BottomBorder .LeftBorder { 87 width : 200px ; 88 float : left ; 89 border-top : solid 1px #ccc ; 90 } 91 div.BottomBorder .RightBorder { 92 width : 750px ; 93 float : left ; 94 margin-left : 10px ; 95 border-top : solid 1px #ccc ; 96 } 97 /* 左右高度自适应 End */ 98 99 100 101 </ style > 102 < div id ="Page" > 103 < div id ="PageLeft" > 104 105 < p > test </ p > 106 < p > test </ p > 107 </ div > 108 < div id ="PageRight" > 109 < p > test </ p > 110 < p > test </ p > 111 < p > test </ p > 112 < p > test </ p > 113 < p > test </ p > 114 < p > hi.baidu.com/ </ p > 115 < p > test </ p > 116 < p > test </ p > 117 < p > test </ p > 118 < p > test </ p > 119 < p > test </ p > 120 121 </ div > 122 < div class ="BottomBorder" > 123 < div class ="LeftBorder" ></ div > 124 < div class ="RightBorder" ></ div > 125 </ div > 126 </ div > 127 </ div > 128 </ body > 129 </ html > </p>
css + div 实现左右div区域高度自动适应
引自:http://www.cnblogs.com/guolichun/archive/2008/04/25/1171179.html

HTML不僅是網頁的骨架,更廣泛應用於多種領域:1.在網頁開發中,HTML定義頁面結構並結合CSS和JavaScript實現豐富界面。 2.在移動應用開發中,HTML5支持離線存儲和地理定位等功能。 3.在電子郵件和新聞通訊中,HTML提升郵件的格式和多媒體效果。 4.在遊戲開發中,HTML5的CanvasAPI用於創建2D和3D遊戲。

theroottaginanhtmldocumentis.servesasthetop-levellementThateNcapsulatesAllotherContent,確保properdocumentstrumentstrumentsureandbrowserparserparsing。

文章解釋說,HTML標籤是用於定義元素的語法標記,而元素是完整的單位,包括標籤和內容。他們一起工作以構建網頁。查拉克計數:159

本文討論了Lt; Head&gt; &&lt;身體&gt; HTML中的標籤,它們對用戶體驗的影響以及SEO的影響。正確的結構增強了網站功能和搜索引擎優化。

本文討論了HTML標籤,和和關注其語義與表現用途及其對SEO和可訪問性的影響之間的差異。

文章討論了在HTML中指定字符,重點介紹了UTF-8。主要問題:確保正確顯示文本,防止亂七八糟的字符,並增強SEO和可訪問性。

本文討論了用於構建和造型Web內容的各種HTML格式標籤,強調了它們對文本外觀的影響以及語義標籤對可訪問性和SEO的重要性。

本文討論了HTML的“ ID”和“類”屬性之間的差異,重點是它們的獨特性,目的,CSS語法和特異性。它解釋了它們的使用如何影響網頁樣式和功能,並為


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

禪工作室 13.0.1
強大的PHP整合開發環境

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!