-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrop-shadow.html
More file actions
53 lines (53 loc) · 1.58 KB
/
drop-shadow.html
File metadata and controls
53 lines (53 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>不规则投影</title>
<style>
div{
position: relative;
width: 100px;
height: 100px;
display: inline-block;
}
.bubble{
border-radius: 10px;
background-color: #fb3;
filter: drop-shadow(2px 2px 2px rgba(0,0,0,.5));
margin-top: 50px;
margin-left: 50px;
}
.bubble::before{
content: '';
position: absolute;
width: 0;
height: 0;
border: 10px solid transparent;
border-left-color: #fb3;
border-right-width: 0;
top: 30px;
right: -10px;
}
.dotted{
border: 10px dotted #fb3;
filter: drop-shadow(2px 2px 1px rgba(0,0,0,.5));
margin-left: 100px;
}
.cutout{
margin-left: 100px;
background: linear-gradient(135deg, transparent 10px, #fb3 0) top left,
linear-gradient(-135deg, transparent 10px, #fb3 0) top right,
linear-gradient(-45deg, transparent 10px, #fb3 0) bottom right,
linear-gradient(45deg, transparent 10px, #fb3 0) bottom left;
background-size: 50% 50%;
background-repeat: no-repeat;
filter: drop-shadow(2px 2px 3px rgba(0,0,0,.5));
}
</style>
</head>
<body>
<div class="bubble"></div>
<div class="dotted"></div>
<div class="cutout"></div>
</body>
</html>