HTML/CSS margin
来源:互联网 发布:淘宝评价雷锋侠 编辑:程序博客网 时间:2024/06/07 02:22
margin 是不同div之间的距离
一个div上下左右距离其他div多远
1、margin:10px 15px 10px 15px;
2、margin:10px ;
3、margin:10px 15px ;
4、margin-top:10px ;
margin-right:15px;
margin-bottom:10px;
margin-left:15px;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>布局02---margin</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script type="text/javascript">
</script>
<style type="text/css">
#container{
width:1300px;
background:gray;
}
#header{
height:120px;
background:red;
}
#main{
height:600px;
background:green;
}
#left{
float:left;
width:900px;
height:600px;
background:pink;
}
.four{
float:left;
width:400px;
height:250px;
margin:10px 15px 10px 15px;
background:purple;
}
#right{
float:right;
width:400px;
height:600px;
background:purple;
}
#footer{
height:120px;
background:yellow;
}
</style>
</head>
<body>
<div id=container>
<div id=header></div>
<div id=main>
<div id=left>
<div class=four></div>
<div class=four></div>
<div class=four></div>
<div class=four></div>
</div>
<div id=right></div>
</div>
<div id=footer></div>
</div>
</body>
</html>
- HTML/CSS margin
- HTML/CSS(五)margin padding border
- Html/CSS margin的百分比 -》深入探讨
- html+css之margin使用方式
- css margin
- CSS--Margin
- CSS margin-left:auto doesnt work with standard html.
- 【HTML打卡】0115 margin重叠、内联元素、css控制段落
- HTML&CSS——margin:0 auto居中
- css margin-top设置html元素之间的距离
- html+css-内层div设置margin-top不起作用
- CSS margin + spadding 、HTML table cellpadding + cellspacing、QFrame模型 QGridLayout margin +spacing
- [CSS]CSS属性 margin
- CSS的Margin用法
- CSS margin的含义
- css中margin省略
- [CSS]---margin-left例子
- CSS margin 属性
- oracle同时执行saveOrUpdate的操作
- 属性指示符的类型及作用
- SQL配置文件中常用的几种SQL语句
- Activiti业务关联流程
- 关于使用struts2实现基本的文件上传功能
- HTML/CSS margin
- 是时候弄清楚getExternalStorageDirectory()和getExternalFilesDir()的区别了
- -Dfile.encoding与Charset.defaultCharset
- python中的xml.dom的使用
- Struts2的Preparable接口
- WechatShortVideo
- LinkedHashMap
- uva 10917 林中漫步 A Walk Through the Forest 迪杰斯特拉
- 二叉搜索树