|
@@ -0,0 +1,59 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="fog-box">
|
|
3
|
+ <div class="fog"></div>
|
|
4
|
+ <svg width="0" height="0" >
|
|
5
|
+ <filter id="steam">
|
|
6
|
+ <feTurbulence type="fractalNoise" baseFrequency=".01" numOctaves="10" />
|
|
7
|
+ <feDisplacementMap in="SourceGraphic" scale="180" />
|
|
8
|
+ </filter>
|
|
9
|
+ </svg>
|
|
10
|
+ </div>
|
|
11
|
+</template>
|
|
12
|
+
|
|
13
|
+<style lang="less" scoped>
|
|
14
|
+
|
|
15
|
+@fog-color: #787F78;
|
|
16
|
+@fog-last-time: 20s;
|
|
17
|
+
|
|
18
|
+.fog-box {
|
|
19
|
+ position: absolute;
|
|
20
|
+ z-index: 20;
|
|
21
|
+ width: 100%;
|
|
22
|
+ height: 100%;
|
|
23
|
+ overflow: hidden;
|
|
24
|
+ // overflow-y: hidden;
|
|
25
|
+
|
|
26
|
+ .fog{
|
|
27
|
+ position: absolute;
|
|
28
|
+ top: -400px;
|
|
29
|
+ width: 100%;
|
|
30
|
+ height: 100%;
|
|
31
|
+ border-radius: 50%;
|
|
32
|
+ box-shadow: -156px 492px 123px -252px @fog-color;
|
|
33
|
+ filter: url(#steam);
|
|
34
|
+ min-width: 600px;
|
|
35
|
+ min-height: 600px;
|
|
36
|
+ animation-name: fogAnimation;
|
|
37
|
+ animation-duration: @fog-last-time;
|
|
38
|
+ animation-direction: normal;
|
|
39
|
+ animation-iteration-count: infinite;
|
|
40
|
+ animation-timing-function: ease-in-out;
|
|
41
|
+ will-change: transform, opacity;
|
|
42
|
+ }
|
|
43
|
+
|
|
44
|
+ @keyframes fogAnimation {
|
|
45
|
+ 0%{
|
|
46
|
+ transform: translate(-20%, -20%);
|
|
47
|
+ opacity: 0;
|
|
48
|
+ }
|
|
49
|
+ 50% {
|
|
50
|
+ opacity: 0.8;
|
|
51
|
+ }
|
|
52
|
+ 100%{
|
|
53
|
+ transform: translate(60%, -40%);
|
|
54
|
+ opacity: 0;
|
|
55
|
+ }
|
|
56
|
+ }
|
|
57
|
+}
|
|
58
|
+
|
|
59
|
+</style>
|