| 爱死你了杏 |
 |
| 等级:大侠 |
| 权限:普通用户 |
| 积分:144 |
| 金钱:3665 |
| 声望:239 |
| 经验:226 |
| 发帖数:997 |
| 注册:2007年11月26日 |
|
|
|
1.将“第一步”提到的五个部分都放入盒子中,在html文件中写入:
Example Source Code [www.52CSS.com] <div id="page-container"> <div id="main-nav">Main Nav</div> <div id="header">Header</div> <div id="sidebar-a">Sidebar A</div> <div id="content">Content</div> <div id="footer">Footer</div> </div> 2.为了将五个部分区分开来,我们将这五个部分用不同的背景颜色标示出来,在CSS文件写入:
Example Source Code [www.52CSS.com] #main-nav { background: red; height: 50px; } #header { background: blue; height: 150px; } #sidebar-a { background: darkgreen; } #content { background: green; } #footer { background: orange; height: 66px; }
|
|
|
|
|
|