-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInsetShadowButton.html
More file actions
45 lines (40 loc) · 983 Bytes
/
InsetShadowButton.html
File metadata and controls
45 lines (40 loc) · 983 Bytes
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
<!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>
div {
position: relative;
margin: 50px auto;
width: 200px;
height: 64px;
border-radius: 20px;
text-align: center;
line-height: 54px;
font-size: 24px;
font-weight: bold;
background: #fc0;
border: 5px solid #333;
box-shadow:
inset 0 -5px 0 #aaa,
inset 0 -10px 0 #000;
cursor: pointer;
transition: .3s;
}
.origin {
box-shadow: none
}
.inset:hover {
background: #aaa;
}
</style>
</head>
<body>
<div class="origin">btn</div>
<div class="inset">btn</div>
<!-- 内阴影也是可以不设置模糊半径的,这样,阴影的内容将会实色而不带模糊效果
利用这个点,我们就可以在内部勾勒出图形本身的部分形状 -->
</body>
</html>