首页 > 其他 > 详细

Layout-2相关代码:3列布局

时间:2019-04-01 18:14:11      阅读:105      评论:0      收藏:0      [点我收藏+]
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
.right,.left{height:300px;width:200px;}
.right{ float:right;background:#000000;}
.left{ float:left;background:#009933;}
.main{background:#F60; height:300px;}
</style>
</head>
<body>
<div class="logo"></div>
<div class="right">RIGHT</div>
<div class="left">LEFT</div>
<div class="main">MAIN</div>    
</body>
</html>

 代码演化:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Layout</title>
<style type="text/css">
* {
	margin: 0;
	padding: 0;
}
body {
	position: relative;
}
.right, .left {
	height: 300px;
	width: 200px;
	z-index: 2;
}
.right {
	position: absolute;
	right: 0;
	top: 0;
	background: #000000;
}
.left {
	position: absolute;
	left: 0;
	top: 0;
	background: #009933;
}
.main {
	margin-right: 200px;
	background: #F60;
	height: 300px;
	margin-left: 200px;
}
</style>
</head>
<body>
<div class="boxmain">
  <div class="main">main</div>
</div>
<div class="left">LEFT</div>
<div class="right">RIGHT</div>
</body>
</html>

 

Layout-2相关代码:3列布局

原文:https://www.cnblogs.com/exesoft/p/10637860.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!