博主信息
博文 48
粉丝 3
评论 1
访问量 46199
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
首页排版练习0326
JackBlog
原创
810人浏览过

实例

<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>Document</title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		.top{
			height: 20px;
			background-color:black;
			color: white;
		}
		
		.header{
			height: 100px;
			background-color: #F0FFFF;
		}
		.banner{
			height: 300px;
			background-color: aliceblue;
		}
		.main{
			width: 1200px;
			margin: 0 auto;
		}
		.main .left{
			width: 400px;
			height: 600px;
			background-color: antiquewhite;
			float: left;
		}
		.main .right{
			width: 800px;
			height: 600px;
			background-color: aquamarine;
			float: right;
		}
		.main:after{
			content: "";
			display: block;
			clear: both;
		}
		
		.main1{
			width: 1200px;
			margin: 0 auto;
			margin-top: 2px;
		}
		.main1 .left{
			width: 200px;
			height: 600px;
			background-color: #FF0000;
			float: left;
		}
		.main1 .middle{
			height: 600px;
			background-color: blue;
			padding-left: 200px;
			padding-right: 200px;
			
		}
		.main1 .right{
			width: 200px;
			height: 600px;
			background-color: crimson;
			float: right;
		}
		.main1:after{
			content: "";
			display: block;
			clear: both;
		}
		
		.footer{
			height: 100px;
			background-color: #000000;
		}
		.location{
			width: 1200px;
			margin: 0 auto;
		}
		
		
		
	</style>
</head>
<body>
	<div class="top"><div class="location">顶部</div></div>
	
	<div class="header"><div class="location">头部
		<div class="logo"></div>
		<div class="dh"></div></div>
	</div>
	
	<div class="banner">轮播图</div>
	
	<div class="main">
		<div class="right">右侧</div>
		<div class="left">左侧</div>
	</div>
		<div class="main1">
		<div class="right">右侧</div>
		
		<div class="left">左侧</div>
		<div class="middle">中侧</div>
	</div>
	
	<div class="footer"><div class="location">底部</div></div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学