HTML+CSS ???? ?? ?? ?? ???(2?)
?? p ???? ???? ???? ?? ?? ???, ???? ?? ? ?? ??? div ??? ???? ?????.
?? ?? ?????. ?? ?? ???? ?????? ?? ?? ??(? ???? ???? ??)? ??? ??, ?? ???? ???? ??? ???? ????
?? ? div? ?? ?? ?? ??? ?? ???? ???. ???? ???? ??? ????? ? ?? div? ?? CSS ???? ?? ?? ? div? 3?? div ??
? ???? ???. ??? ??? ????.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> #dv1{ width:800px; height:500px; border:1px solid red; margin:0 auto; /*居中*/ } </style> </head> <body> <div id="dv1"> <div id="top">頭部</div> <div id="cen">中部</div> <div id="but">底部</div> </div> </body> </html>
, ?? ??? ???? ?? div ??? ???? ???. ?? ??? ??? ????.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> #dv1{ width:800px; height:500px;border:1px solid red;margin:0 auto; /*居中*/text-align:center; } #top{ width:780px;height:100px;border:1px solid green;margin:0 auto;background-color:#ccc;margin-top:30px; } #cen{ width:780px; height:200px;border:1px solid black;margin:0 auto;background-color:#f77;margin-top:5px; } #but{ width:780px;height:100px;border:1px solid #f60;margin:0 auto;margin-top:5px; } #left{ width:200px; height:198px; border:1px solid green; margin-left:5px; float:left; } #right{ width:570px; height:198px; border:1px solid black; float:right; } </style> </head> <body> <div id="dv1"> <div id="top">頭部</div> <div id="cen"> <div id="left">左邊</div> <div id="right">右邊</div> </div> <div id="but">底部</div> </div> </body> </html>
??: ???? ??, ???, ??, ????? ???? ???.
??? ?? ??
??? ?? ??
??? ??? ???
??? ?? ??