摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <style> *{ margin: 0; padding: 20px; } .box1{ width
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
margin: 0;
padding: 20px;
}
.box1{
width: 100px;
height: 100px;
border: 1px solid red;
}
.box2{
width: 100px;
height: 100px;
border: 1px double blue;
margin: 10px 0;
box-shadow:-10px 20px 2px #ccc;
}
.box3{
width: 100px;
height: 100px;
border: 1px dashed red;
}
.box4{
width: 100px;
height: 100px;
border: 1px dotted red;
box-shadow:10px 20px 2px #ccc;
margin: 10px 0;
}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>例子