HTML/CSS border
2015-09-01 11:23
555 查看
border是div的边框,在div外面加边框
1、 border:10px solid black;//dashed
2、 border-top:10px solid black;
border-right:10px solid black;
border-bottom:10px solid black;
border-left:10px solid black;
<!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>布局03---border</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:15px ;
border:10px solid black;//dashed
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>
1、 border:10px solid black;//dashed
2、 border-top:10px solid black;
border-right:10px solid black;
border-bottom:10px solid black;
border-left:10px solid black;
<!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>布局03---border</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:15px ;
border:10px solid black;//dashed
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>
相关文章推荐
- css3 动画效果 总结 不断完善~~
- HTML/CSS margin
- CSS3实现银灰色动画效果的导航菜单代码
- CSS样式渐变写法
- HTML/CSS 简单布局01
- CSS透明属性详解代码
- CSS 样式显示为小手
- CSS Hack大全-教你如何区分出IE6-IE10、FireFox、Chrome、Opera
- 懒人css3样式代码生成器-一款懒人的样式生成代码工具
- css3 特性
- 使用css实现全兼容tooltip提示框
- 如何使用CSS3画出一个叮当猫
- CSS hack
- js+CSS实现模拟华丽的select控件下拉菜单效果
- js+css实现有立体感的按钮式文字竖排菜单效果
- CSS Reset文件
- 合并多个css或js请求 来加快页面加载速度
- CSS做一个小黄人
- 常用的默认样式重置
- css sprites——CSS精灵