Default.aspx 页面代码如下:<head>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div>
<div id="top">标题Logo 栏</div>
<div id="( 1 )">导航栏</div>
<div id="( 2 )">左边</div>
<div id="( 3 )">中间</div>
<div id="( 4 )">右边</div>
<div id="( 5 )">页脚</div>
</div>
</body>
StyleSheet.CSS
div
{
/* 格式:属性名:值; */
box-sizing:border-box;
( 6 ) /* 宽度 100% */
( 7 ) /*文本居中对齐*/
( 8 ) /*边框绿色、1 像素宽、实线(属性值按此顺序写)*/
}
#top
{
width: 100%; /* ( 9 )*/
( 10 )/* 高度 56 像素 */
( 11 )/*垂直居中*/
( 12 )/* 字体黑体*/
( 13 )/* 字号 xx-large */
}
#navigation
{
/*设置宽度与#top 相同,高(height)为 24 像素,文字垂直居中*/
(14 )
(15 )
(16 )
}
#left
{
width: 10%; height:
104px;
line-height:104px;
( 17 ) /*“元素左浮动*/
}
#mid
{
width: 80%;
height: 104px;
line-height:104px;
float: left;
}
#right
{
width: 10%;
height: 104px;
line-height:104px;
float:left;
( 18 ) /*不允许元素的右边有浮动元素*/
}
#bottom
{
width: 100%;
height: 24px;
line-height:24px;
font-family:黑体;
( 19 ) /*不允许元素的左右两边有浮动元素*/
}