布局练习
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> *{ padding: 0; margin: 0; } .w{ width: 1000px; margin:auto; } header{ height: 150px; background-color: #bfa; } main.w{ height: 500px; background-color: #ff0; margin: 10px auto; } main nav{ width: 190px; height: 100%; background-color: #00FFFF; float: left; } main section{ width: 600px; height: 100%; background-color: #FF0000; float: left; margin: 0 10px; } main aside{ width: 190px; height: 100%; background-color: green; float: left; } footer{ height: 150px; background-color: orange; } </style> </head> <body> <header class="w"></header> <main class="w"> <nav></nav> <section></section> <aside></aside> </main> <footer class="w"></footer> </body> </html>
本文来自博客园,作者:氯丙嗪,转载请注明原文链接:https://www.cnblogs.com/YcxyH/p/16281533.html