首先我们定义一个div
<body>
<div class="king"></div>
</body>
设置一下div的初始样式
<head>
<meta charset="utf-8">
<style type="text/css">
.king{
width:100px;
height:100px;
background-color:#ffffff;
margin:0 auto;
border-color:red;
border-width:5px;
border-style:solid;
border-color:yellow green blue red;
}
</style>
</head>
修改CSS:
width:0px;
height:0px;
border-width:50px;
修改border颜色
border-color:red transparent transparent transparent;
修改border颜色
border-color:transparent transparent transparent red;
修改border颜色
border-color:transparent transparent red transparent;