時(shí)間:2023-09-20 10:18:01 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)
時(shí)間:2023-09-20 10:18:01 來(lái)源:網(wǎng)站運(yùn)營(yíng)
傳統(tǒng)網(wǎng)頁(yè)布局三種方式:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .father { width: 800px; background-color: black; font-size: 50px; margin: 0 auto; } .test1 { width: 200px; height: 200px; float: left; background-color: red; } .test2 { clear: left; } .test3 { width: 400px; height: 400px; background-color: blue; } </style></head><body> <div class="father"> <div class="test1"></div> <div class="test2"></div> <div class="test3"></div> </div> </body></html>
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .father { overflow: hidden; width: 800px; background-color: black; font-size: 50px; margin: 0 auto; } .test1 { width: 200px; height: 200px; float: left; background-color: red; } .test3 { width: 400px; height: 400px; background-color: blue; } </style></head><body> <div class="father"> <div class="test1"></div> <div class="test3"></div> </div> </body></html>
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .clearfix::after { content: ""; display: block; height: 0; clear: both; visibility: hidden; } .clearfix { /* IE6、7專有*/ *zoom: 1; } .father { width: 800px; background-color: black; font-size: 50px; margin: 0 auto; } .test1 { width: 200px; height: 200px; float: left; background-color: red; } .test3 { width: 400px; height: 400px; background-color: blue; } </style></head><body> <div class="father clearfix"> <div class="test1"></div> <div class="test3"></div> </div></body></html>
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .clearfix::before,.clearfix::after { content: ""; display: table; } .clearfix::after { clear: both; } .clearfix { /* IE6、7專有*/ *zoom: 1; } .father { width: 800px; background-color: black; font-size: 50px; margin: 0 auto; } .test1 { width: 200px; height: 200px; float: left; background-color: red; } .test3 { width: 400px; height: 400px; background-color: blue; } </style></head><body> <div class="father clearfix"> <div class="test1"></div> <div class="test3"></div> </div></body></html>
關(guān)鍵詞:方式,布局,傳統(tǒng)
客戶&案例
營(yíng)銷資訊
關(guān)于我們
客戶&案例
營(yíng)銷資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。