书写: border:1px solid red;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div{
width:200px;
height:200px;/*border:none; 可以没有边框*//*border-left:none; 左边的边框可以去掉*/
border-width:6px;
border-style:dotted;
border-color:red;
border:6px dotted red; /*等同于上面蓝色的写法*/
border-width:6px 10px 20px 30px;
border-style:dotted solid;
border-color:red blue green yellow;
/*也可以写为:border-top: 6px dotted red; */
/*也可以写为:border-right: 10px solid blue; */
/*也可以写为:border-bottom: 20px dotted green; */
/*也可以写为:border-left: 30px solid yellow; */
绿色描述的效果图为:
}
</style>
</head>
<body>
<div>文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字
</div>
</body>
</html>