整体样式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>整体样式</title>
<style>
div {
width: 100px;
height: 30px;
}
#div1 {
border-width: 1px;
border-style: dashed;
border-color: red;
}
#div2 {
border-width: 1px;
border-style: solid;
border-color: red;
}
img {
width: 150px;
height: 150px;
border-width: 2px;
border-style: solid;
border-color: red;
}
#div3 {
border: 1px solid red;
}
</style>
</head>
<body>
<div id="div1"></div>
<br/>
<div id="div2"></div>
<br/>
<img src="https://p92.com/binaries/content/gallery/p92website/technologies/htmlcssjs-overview.png" alt="海贼王之索隆">
<div id="div3">边框样式简写</div>
</body>
</html>

局部样式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>局部样式</title>
<style>
#div1 {
width: 100px;
height: 60px;
border-left: 2px solid green;
border-top: 2px solid red;
border-right: 2px solid yellow;
border-bottom: 2px solid blue;
}
#div2 {
width: 100px;
height: 60px;
border: 1px solid red;
border-bottom: 0px;
}
</style>
</head>
<body>
<div id="div1"></div>
<br/>
<div id="div2"></div>
</body>
</html>
