border属性详解:
border:10px solid red;
border-width:10px;
border-style:solid;
border-color:red;1、线性:solid(实线)dashed(虚线) dotted(点状线)doubble(双线)none/0(没有边框)
2、单一一个方向添加边框:border-right: 10px solid red;
border-left/right/top/bottom3、边框设置方法:
border:solid-red;
border-width:
一个值:四周
俩个值:上下 左右
三个值:上 左右 下
四个值:顺时针设置,上 右 下 左4:transparent:代替颜色值 为 透明
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文本属性</title>
<style type="text/css">
body{
text-align: center;
}
#box{
display: inline-block;
width: 0;
height: 0;
margin-left: 100px;
border-left: 100px solid red;
border-top: 100px solid transparent;
border-bottom: 100px solid transparent;
}
#box1{
display: inline-block;
width: 0;
height: 0;
margin-left: 100px;
border-top: 100px solid red;
border-left: 100px solid transparent;
border-right: 100px solid transparent;
}
#box2{
display: inline-block;
width: 0;
height: 0;
margin-left: 100px;
border-right: 100px solid red;
border-top: 100px solid transparent;
border-bottom: 100px solid transparent;
}
#box3{
display: inline-block;
width: 0;
height: 0;
margin-left: 100px;
border-bottom: 100px solid red;
border-left: 100px solid transparent;
border-right: 100px solid transparent;
}
</style>
</head>
<body>
<div id="box"></div>
<div id="box1"></div>
<div id="box2"></div>
<div id="box3"></div>
</body>
</html>