-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss_property_shadow.html
91 lines (80 loc) · 2.08 KB
/
css_property_shadow.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
font-family: 'Courier New', Courier, monospace;
text-align: center;
background-color: #f0f0f0;
}
.container {
margin: 10px 100px;
padding: 10px;
box-shadow: 0 0 5px black;
border-radius: 5px;
background-color: #fff;
}
/* basic text-shadow: horizontal offset, vertical offset, blur radius, color */
.text-shadow-example {
text-shadow: 0 0 2px blueviolet;
}
/* box shadow rxamples */
.box-shadow-examples {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.box-shadow-examples > div {
width: 150px;
height: 100px;
margin: 20px;
padding: 10px;
font-size: 16px;
background-color: #ddd;
display: flex;
align-items: center;
justify-content: center;
}
/* basic box-shadow: horizontal offset, vertical offset, blur radius, color */
.box-shadow-1 {
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
}
/* box shadow with spread radius */
.box-shadow-2 {
box-shadow: 4px 4px 10px 5px rgba(0, 0, 0, 0.5);
}
/* multiple box shadows */
.box-shadow-3 {
box-shadow:
4px 4px 10px rgba(0, 0, 0, 0.5),
-4px -4px 10px rgba(255, 0, 0, 0.5);
}
/* inset box shadow */
.box-shadow-4 {
box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.5);
}
/* spread radius and inset box shadow */
.box-shadow-5 {
box-shadow:
4px 4px 10px rgba(255, 0, 0, 0.5),
inset 4px 4px 10px rgba(0, 0, 0, 0.5);
}
</style>
</head>
<body>
<h1>CSS Property : Shadow</h1>
<div class="container">
<h2 class="text-shadow-example">Text Shadow</h2>
<div class="box-shadow-examples">
<div class="box-shadow-1">Box Shadow 1</div>
<div class="box-shadow-2">Box Shadow 2</div>
<div class="box-shadow-3">Box Shadow 3</div>
<div class="box-shadow-4">Box Shadow 4</div>
<div class="box-shadow-5">Box Shadow 5</div>
</div>
</div>
</body>
</html>