常见阴影
# 菜单投影
<template>
<div class="shadow1"></div>
</template>
<script>
export default {
}
</script>
<style>
.shadow1 {
margin: 0 auto;
width: 100px;
height: 50px;
background-color: rgba(0, 173, 181);
box-shadow: 0 3px 12px rgba(0, 173, 181, 0.8);
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 三角形
<template>
<div class="shadow-triangle"></div>
</template>
<script>
export default {
}
</script>
<style>
.shadow-triangle{
margin: 0 auto;
width: 0;
height: 0;
border-style: solid;
border-width: 0 50px 50px 50px;
border-color: transparent transparent #00adb5 transparent;
filter:drop-shadow(10px 0px 10px rgba(39,92,171,0.5));
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 信息窗口
<template>
<div class="tip"></div>
</template>
<script>
export default {
}
</script>
<style>
.tip {
margin: 0 auto;
width: 140px;
height: 80px;
border: 1px solid #00adb5;
border-radius: 4px;
position: relative;
background-color: #fff;
filter: drop-shadow(0px 2px 4px rgba(64, 158, 225, 0.9));
}
.tip::before {
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 0 10px 10px 10px;
border-color: transparent transparent #fff transparent;
position: absolute;
top: -10px;
left: 0;
right: 0;
margin: auto;
z-index: 2;
}
.tip::after {
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 0 10px 10px 10px;
border-color: transparent transparent #00adb5 transparent;
position: absolute;
top: -11px;
left: 0;
right: 0;
margin: auto;
z-index: 1;
}
</style>
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
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
编辑 (opens new window)
上次更新: 2021/07/01, 20:33:02