4月15号笔记
1.生成效果图1:

代码演示:
点击查看代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{margin:0;padding:0}
.parent{
margin:0 auto;
width:1000px;
overflow:hidden;/*子集元素浮动后,父级塌陷*/
background-color:yellow;
}
.son1{
float:left;
width:25%;
height:200px;
background-color:blue;
}
.red{
float:left;
width:25%;
height:200px;
background-color:red;
}
.green{
float:left;
width:25%;
height:200px;
background-color:green;
}
</style>
</head>
<body>
<div class="parent">
<div class="son1"></div>
<div class="red"></div>
<div class='green'></div>
</div>
</body>
</html>
2生成效果图2:

代码演示:
点击查看代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{margin:0;padding:0;}
.top{
margin:0 auto;
width:500px;
height:20px;
background-color:red;
border:10px solid black;
}
</style>
</head>
<body>
<div class="top">
<div class="left1"></div>
<div class="bottle"></div>
<div class="right1"></div>
</div>
</body>
</html>
3.效果图3:

代码演示:
点击查看代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{margin:0;padding:0;}
.top{
margin:0 auto;
width:500px;
height:20px;
background-color:red;
}
.left1{
float:left;
width:20px;
height:200px;
background-color:blue;
}
.bottle{
float:right;
width:500px;
height:20px;
background-color:brown;
}
.right1{
margin-left:auto;
width:20px;
height:200px;
background-color:green;
}
</style>
</head>
<body>
<div class="top">
<div class="left1"></div>
<div class="bottle"></div>
<div class="right1"></div>
</div>
</body>
</html>
浙公网安备 33010602011771号