<!doctype html><html>? ? <head>? ? ? ? <meta charset="UTF-8">?? ? ? ? <style>? ? ? ? ? ? header{height:150px;background:#ABCDEF;} nav{height:30px;background:#FF0;margin-bottom:0px;} div{height:700px;margin-top:15px;} section{height:700px;width:70%;background:#ABCDEF;float:left;} aside{height:700px;width:28%;background:#ABCDEF;float:right;} footer{height:100px;background:#ABCDEF;clear:both;margin-top:15px;}? ? ? ? </style>? ? </head>? ? <body>? ? ? ? <header>? ? ? ? ? ? <p>這是一個頭標簽</p>? ? ? ? ? ? <nav></nav>? ? ? ? </header>? ? ? ? <div>? ? ? ? ? ? <section>? ? ? ? ? ? ? ? <p>這是一個section頭標簽</p>? ? ? ? ? ? </section>? ? ? ? ? ? <aside>? ? ? ? ? ? ? ? <p>這是一個aside標簽</p>? ? ? ? ? ? </aside>? ? ? ? </div>? ? ? ? <footer>? ? ? ? ? ? <p>這是一個footer標簽</p>? ? ? ? </footer>? ? </body></html>上述代碼中nav標簽里設置css樣式,用margin-bottom:不起作用為什么,margin-top:就有用這又是為什么
css的知識
qiqiqiqi010629
2015-12-16 14:18:09