html+css单列布局

<style>
.header{
margin:0 auto;  /*居中*/
max-width: 960px;
height:100px;
border:1px solid red;
}
.content{
margin:0 auto;
max-width: 900px;
height:600px;
border:1px dashed green;
}
.footer{
margin:0 auto;
max-width: 960px;
height:100px;
border:1px dotted red;
}

</style>

</head>
<body>
<div class="header">头部</div>
<div class="content">内容</div>
<div class="footer">底部</div>

</body>

posted @ 2021-11-20 11:02  paoPaoLong_liu  阅读(67)  评论(0)    收藏  举报