class 1 模板&盒子模型
2016-10-11 21:37
134 查看
基础模板
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>随意</title>
</head>
<body>
</body>
</html>
盒子模型
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>随意</title>
<style>
body{
margin:10px;
padding:10px;
}
.uni{(uni—相同部分 以便减少代码)
width:200px;
height:200px;
float:left;(浮动:left左/right右)
}
#first{(#是id)
width:500px;
height:500px;
background:white;
margin:0 auto;
}
#second{
background:red;
margin-right:10px;
margin-bottom:10px;
}
#third{
background:green;
margin-bottom:10px;
}
#fourth{
background:black;
margin-right:10px;
}
#fifth{
background:blue;
}
</style>
</head>
<body>
<div id="first">
<div id="second" class="uni">(class定义为任意字母)
</div>
<div id="third" class="uni">
</div>
<div id="fourth" class="uni">
</div>
<div id="fifth" class="uni">
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>随意</title>
</head>
<body>
</body>
</html>
盒子模型
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>随意</title>
<style>
body{
margin:10px;
padding:10px;
}
.uni{(uni—相同部分 以便减少代码)
width:200px;
height:200px;
float:left;(浮动:left左/right右)
}
#first{(#是id)
width:500px;
height:500px;
background:white;
margin:0 auto;
}
#second{
background:red;
margin-right:10px;
margin-bottom:10px;
}
#third{
background:green;
margin-bottom:10px;
}
#fourth{
background:black;
margin-right:10px;
}
#fifth{
background:blue;
}
</style>
</head>
<body>
<div id="first">
<div id="second" class="uni">(class定义为任意字母)
</div>
<div id="third" class="uni">
</div>
<div id="fourth" class="uni">
</div>
<div id="fifth" class="uni">
</div>
</div>
</body>
</html>
相关文章推荐
- 简单的盒子模型Div+Css
- 台大林轩田《机器学习基石》学习笔记7:线性模型三(Multiclass Prediction)
- 模板编译模型
- 盒子模型&position定位
- 盒子模型&position定位
- CSS大小设置实例——盒子模型
- css3中弹性盒子模型
- 盒子模型
- CSS"盒子模型"
- 盒子模型
- 盒子模型之商品分类列表页面
- 盒子模型里面的margin属性和padding属性杂记
- EMAP开发时创建页面模型后,根据模型中查询动作生成页面模板,没有数据显示
- 讲给Android程序员看的前端教程(18)——盒子模型
- css中的盒子模型
- Div+CSS两种盒子模型
- 盒子模型
- 06-作业练习盒子模型
- CSS魔法堂:盒子模型简介
- C++ Tempatet之模板模型