赢在职场-WEB全栈开发-1-7margin
来源:互联网 发布:photoshopcs6 for mac 编辑:程序博客网 时间:2024/05/18 13:22
1-7margin 外边距
<!doctype html>
<html>
<head>
<title>抬头</title>
<meta charset="utf-8">
<style>
.InternalStyle1
{
width:300px;
height:300px;
background:green center bottom no-repeat url("dragon.png");
border: purple 30px solid;
padding-top: 100px;
margin-bottom: 30px;//外边距
}
.InternalStyle2
{
width:300px;
height:300px;
background:orange center bottom no-repeat url("dragon.png");
border: brown 60px solid;
padding-top: 100px;
margin-top: 60px;//外边句会叠加,注意InternalStyle1与InternalStyle2放在一起时只有60px(最大)的边距,而不是相加后的90px
//margin:top right bottom left;//复合写法
//margin:top/bottom right/left;
}
</style>
<link href = "main.css" rel = "stylesheet">
</head>
<body>
<div class = "InternalStyle1">Internal Style1 内部样式1</div>
<div class = "InternalStyle2">Internal Style2 内部样式2</div>
<div class = "InternalStyle2">
边距传递
<div class = "InternalStyle1">
边距传递:父子级包含时,子级的margin-top会传递给父级。
</div>
</div>
</body>
</html>
- 赢在职场-WEB全栈开发-1-7margin
- 赢在职场-WEB全栈开发-1-1初识前段
- 赢在职场-WEB全栈开发-1-2浅析
- 赢在职场-WEB全栈开发-1-3CSS的位置
- 赢在职场-WEB全栈开发-1-4background讲解
- 赢在职场-WEB全栈开发-1-5border
- 赢在职场-WEB全栈开发-1-6padding
- 赢在职场-WEB全栈开发-1-8盒子模型
- 赢在职场-WEB全栈开发-1-9 文本样式概览
- 赢在职场-WEB全栈开发-1-1初识前段、1-2浅析、1-3CSS的位置
- 赢在职场(转)
- mysql 赢在职场 学习
- 人在职场
- 人在职场2
- 人在职场,经验之谈
- 生活在职场
- 如何在职场中脱颖而出?
- 学会在职场中成长
- 常用数据库的JDBC驱动程序写法
- 赢在职场-WEB全栈开发-1-6padding
- NYOJ 喷水装置(一) (贪心)
- 图像处理中常用的彩色模型
- 用java编程输出九九乘法表
- 赢在职场-WEB全栈开发-1-7margin
- 茫无头绪的瞎侃
- swift数据类型
- 第10、11周项目5:摩托车继承自行车和机动车
- Java多线程
- next_permutation
- linux动态库及静态库的制作 和makefile 的简单编写
- 第109讲: Spark Streaming电商广告点击综合案例动态黑名单基于数据库MySQL的真正操作代码实战
- Java throws以及throw疑惑解析