基本应用
box-shadow:param1 param2 param3 param4
param1:向右偏移
param2:向下偏移
param3:模糊程度
param4:颜色
举例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div{
box-shadow: 10px 10px 10px grey;
background-color: aqua;
width: 100px;
height: 50px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
若将样式改为:
box-shadow: 0px 0px 10px grey;
background-color: aqua;
width: 100px;
height: 50px;
border-radius: 10%;
则可以有周围一圈有一层淡淡的阴影的效果: