如何使用CSS格式化页面布局示例(附图)

你的心应该保持这种模样,略带发力的紧张,不松懈,对待不定有坦然。损伤是承载,沉默是扩展。终结是新的开始。如此,我会为你的心产生敬意。

源代码:

复制代码
代码如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style type="text/css">
<!--
body{background:#ffcc99;}
#header{margin:0px auto;width:1000px;height:100px;background:#FFFFCC;}
#menu{margin:5px auto;width:1000px;height:30px;line-height:30px;color:#99FF99;
font-weight:bold;font-size:14px;background:#6699FF;}
#content{margin:5px auto;width:1000px;height:400px;background-color:#cccccc;}
.content_left{float:left;width:200px;height:400px;background:#cc99ff;}
.content_center{float:left;width:590px;height:400px;margin-left:5px;background:#cc99ff;}
.content_right{float:left;width:200px;height:400px;margin-left:5px;background:#cc99cc}

#footer1{margin:5px auto;background-color:#5185E6;color:#FFFFFF;
border-top:0px solid #F7F7F6;height:30px;line-height:30px;
width:1000px;padding:5px 0;text-align:center;}

#footer2{margin:5px auto;background-color:#3333FF;color:#FFFFFF;
border-top:0px solid #F7F7F6;height:30px;line-height:30px;
width:1000px;padding:5px 0;text-align:center;}

a{
text-decoration:none;
}

-->
</style>
</head>

<body>
<div id="header">页面头部</div>
<div id="menu">
页面导航
<tr>
<td>
<a rel="nofollow noopener noreferrer" href="" target="_blank" >首页 <a rel="nofollow noopener noreferrer" href="" target="_blank" >日志 <a rel="nofollow noopener noreferrer" href="" target="_blank" >相册 <a rel="nofollow noopener noreferrer" href="" target="_blank" >留言板 <a rel="nofollow noopener noreferrer" href="" target="_blank" >状态
</td>
</tr>
</div>
<div id="content">
<div class="content_left">左侧栏</div>
<div class="content_center">中间内容</div>
<div class="content_right">右侧栏</div>
</div>
<div id="footer1">滚动信息栏</div>
<div id="footer2">底部</div>
</body>
</html>

实现效果:

到此这篇关于如何使用CSS格式化页面布局示例(附图)就介绍到这了。世间最温暖的字莫过于爱,最伟大的力量莫过于爱。更多相关如何使用CSS格式化页面布局示例(附图)内容请查看相关栏目,小编编辑不易,再次感谢大家的支持!

您可能有感兴趣的文章
css让页脚保持在底部位置的四种方案

CSS如何使用Flex和Grid布局如何实现3D骰子

Flex布局史上最简单使用语法教程

新的CSS 伪类函数 :is() 和 :where()示例详解

纯CSS打字动画的如何实现示例