基本應用
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%;
則可以有周圍一圈有一層淡淡的陰影的效果: