关于DIV + CSS无缝拼接和两个DIV并排,请高人指点!
我想做一个DIV+CSS布局的网页页面布局如图DIV1、DIV2、DIV3为背景层用来放置背景图片需要无缝拼接DIV1a、DIV1b、DIV1c属于DIV1DIV2a、D...
我想做一个DIV + CSS 布局的网页 页面布局如图
DIV1、DIV2、DIV3为背景层用来放置背景图片需要无缝拼接
DIV1a、DIV1b、DIV1c属于DIV1
DIV2a、DIV2b属于DIV2
DIV3a、DIV3b、DIV3c属于DIV3
且
DIV1a、DIV1b
DIV2a、DIV2b
DIV3a、DIV3b、DIV3c
需要并列排列
请高人给出源代码!(高分奉上)不胜感激
bearyes@gmail.com 展开
DIV1、DIV2、DIV3为背景层用来放置背景图片需要无缝拼接
DIV1a、DIV1b、DIV1c属于DIV1
DIV2a、DIV2b属于DIV2
DIV3a、DIV3b、DIV3c属于DIV3
且
DIV1a、DIV1b
DIV2a、DIV2b
DIV3a、DIV3b、DIV3c
需要并列排列
请高人给出源代码!(高分奉上)不胜感激
bearyes@gmail.com 展开
展开全部
里面的长宽和内容自己修改。
<!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>无标题文档</title>
<style type="text/css">
*{
margin:0;
padding:0;
}
.d1 {
margin: auto;
height: 200px;
width: 504px;
}
.d2 {
margin: auto;
height: 200px;
width: 504px;
}
.d3 {
margin: auto;
height: 200px;
width: 504px;
}
.d1-1 {
height: 100px;
width: 504px;
float: left;
background-color: #000;
}
.d1-2 {
height: 100px;
width: 252px;
float: left;
background-color: #030;
}
.d1-3 {
height: 100px;
width: 252px;
float: left;
background-color: #CF0;
}
.d2-1 {
height: 200px;
width: 252px;
float: left;
background-color: #03F;
}
.d2-2 {
height: 200px;
width: 252px;
float: left;
background-color: #F00;
}
.d3-1 {
height: 200px;
width: 168px;
float: left;
background-color: #900;
}
.d3-2 {
height: 200px;
width: 168px;
float: left;
background-color: #FFC;
}
.d3-3 {
height: 200px;
width: 168px;
float: left;
background-color: #36C;
}
</style>
</head>
<body>
<div class="d1">
<div class="d1-1"></div>
<div class="d1-2"></div>
<div class="d1-3"></div>
</div>
<div class="d2">
<div class="d2-1"></div>
<div class="d2-2"></div>
</div>
<div class="d3">
<div class="d3-1"></div>
<div class="d3-2"></div>
<div class="d3-3"></div>
</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>无标题文档</title>
<style type="text/css">
*{
margin:0;
padding:0;
}
.d1 {
margin: auto;
height: 200px;
width: 504px;
}
.d2 {
margin: auto;
height: 200px;
width: 504px;
}
.d3 {
margin: auto;
height: 200px;
width: 504px;
}
.d1-1 {
height: 100px;
width: 504px;
float: left;
background-color: #000;
}
.d1-2 {
height: 100px;
width: 252px;
float: left;
background-color: #030;
}
.d1-3 {
height: 100px;
width: 252px;
float: left;
background-color: #CF0;
}
.d2-1 {
height: 200px;
width: 252px;
float: left;
background-color: #03F;
}
.d2-2 {
height: 200px;
width: 252px;
float: left;
background-color: #F00;
}
.d3-1 {
height: 200px;
width: 168px;
float: left;
background-color: #900;
}
.d3-2 {
height: 200px;
width: 168px;
float: left;
background-color: #FFC;
}
.d3-3 {
height: 200px;
width: 168px;
float: left;
background-color: #36C;
}
</style>
</head>
<body>
<div class="d1">
<div class="d1-1"></div>
<div class="d1-2"></div>
<div class="d1-3"></div>
</div>
<div class="d2">
<div class="d2-1"></div>
<div class="d2-2"></div>
</div>
<div class="d3">
<div class="d3-1"></div>
<div class="d3-2"></div>
<div class="d3-3"></div>
</div>
</body>
</html>
展开全部
<!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>
body{
margin:0px;
padding:0px;
text-align:center;
}
div{
margin:0px;
padding:0px;
margin:auto;
}
.cl{
clear:both;
}
#div1{
background:#FEE9F4;
width:970px;
}
#div2{
background:#E9FEF0;
width:970px;
}
#div3{
background:#C7C2FC;
width:970px;
}
</style>
</head>
<body>
<div id="div1">
<div style="height:30px;width:960px;border:1px solid #000;">div1c</div>
<div style="width:455px;height:300px;float:left;border:1px solid #000;margin:10px;">div1a</div>
<div style="width:455px;height:300px;float:right;border:1px solid #000;margin:10px;">div1b</div>
<div class="cl"></div>
</div>
<div id="div2">
<div style="width:455px;height:300px;float:left;border:1px solid #000;margin:10px;">div2a</div>
<div style="width:455px;height:300px;float:right;border:1px solid #000;margin:10px;">div2b</div>
<div class="cl"></div>
</div>
<div id="div3">
<div style="width:300px;height:300px;float:left;border:1px solid #000;margin:10px;">div3a</div>
<div style="width:300px;height:300px;float:left;border:1px solid #000;margin:10px;">div3b</div>
<div style="width:300px;height:300px;float:right;border:1px solid #000;margin:10px;">div3c</div>
<div class="cl"></div>
</div>
</body>
</html>
清晰明了,有问题还可以追问。
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style>
body{
margin:0px;
padding:0px;
text-align:center;
}
div{
margin:0px;
padding:0px;
margin:auto;
}
.cl{
clear:both;
}
#div1{
background:#FEE9F4;
width:970px;
}
#div2{
background:#E9FEF0;
width:970px;
}
#div3{
background:#C7C2FC;
width:970px;
}
</style>
</head>
<body>
<div id="div1">
<div style="height:30px;width:960px;border:1px solid #000;">div1c</div>
<div style="width:455px;height:300px;float:left;border:1px solid #000;margin:10px;">div1a</div>
<div style="width:455px;height:300px;float:right;border:1px solid #000;margin:10px;">div1b</div>
<div class="cl"></div>
</div>
<div id="div2">
<div style="width:455px;height:300px;float:left;border:1px solid #000;margin:10px;">div2a</div>
<div style="width:455px;height:300px;float:right;border:1px solid #000;margin:10px;">div2b</div>
<div class="cl"></div>
</div>
<div id="div3">
<div style="width:300px;height:300px;float:left;border:1px solid #000;margin:10px;">div3a</div>
<div style="width:300px;height:300px;float:left;border:1px solid #000;margin:10px;">div3b</div>
<div style="width:300px;height:300px;float:right;border:1px solid #000;margin:10px;">div3c</div>
<div class="cl"></div>
</div>
</body>
</html>
清晰明了,有问题还可以追问。
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
邮件已发送,请查收。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询