File tree 2 files changed +40
-17
lines changed
2 files changed +40
-17
lines changed Original file line number Diff line number Diff line change 41
41
} ) ;
42
42
var radius = Math . random ( ) ;
43
43
44
- var wSpan = $ ( "<span>" ) . addClass ( "word w" + word . weight ) . append ( word . text ) ;
44
+ var wSpan = $ ( "<span>" ) . addClass ( "word w" + word . weight ) . append ( $ ( "<span>" ) . addClass ( " word-text" ) . text ( word . text ) ) ;
45
45
46
46
$this . append ( wSpan ) ;
47
47
79
79
drawTag ( word_array [ i ] ) ;
80
80
setTimeout ( ( ) => {
81
81
runWord ( i + 1 ) ;
82
- } , 150 ) ;
82
+ } , 50 ) ;
83
83
} else {
84
84
setTimeout ( ( ) => {
85
85
runWord ( i ) ;
Original file line number Diff line number Diff line change 1
- section #cloud {
1
+ section #cloud {
2
2
background : $darkGradient ;
3
3
color : $white ;
4
4
5
- .wrapper {
5
+ .wrapper {
6
6
margin : auto ;
7
7
width : 960px ;
8
8
max-width : 100% ;
9
- padding :30px ;
9
+ padding : 30px ;
10
10
11
11
.cloud {
12
- position : relative ;
13
- @media screen and (max-width : 767px ) {
14
- width : 315px ;
15
- height : 500px ;
16
- }
17
- min-height : 300px ;
12
+ position : relative ;
13
+ @media screen and (max-width : 767px ) {
14
+ width : 315px ;
15
+ height : 500px ;
16
+ }
17
+ min-height : 300px ;
18
18
}
19
19
}
20
20
@@ -23,19 +23,43 @@ section#cloud{
23
23
}
24
24
25
25
.word {
26
- transition : all 1s ease ;
26
+ color : var (--word-color );
27
+ position : relative ;
28
+
29
+ & ::before {
30
+ content : " " ;
31
+ position : absolute ;
32
+ bottom : 0 ;
33
+ left : 0 ;
34
+ width : 100% ;
35
+ height : 0 ;
36
+ background-color : var (--bg-word-color );
37
+ transition : height 0.7s ease ;
38
+ }
39
+
40
+ & :hover {
41
+ & ::before {
42
+ height : 100% ;
43
+ }
44
+ .word-text {
45
+ mix-blend-mode : difference ;
46
+ }
47
+ }
27
48
}
28
49
29
50
.w10 {
30
- color : $sandyBrown ;
51
+ --word-color : #{$sandyBrown } ;
52
+ --bg-word-color : #{$sandyBrown } ;
31
53
font-size : 1.6rem ;
32
54
}
33
55
.w9 {
34
- color : $nyanza ;
56
+ --word-color : #{$nyanza } ;
57
+ --bg-word-color : #{$nyanza } ;
35
58
font-size : 1.5rem ;
36
59
}
37
60
.w8 {
38
- color : $periwinki ;
61
+ --word-color : #{$periwinki } ;
62
+ --bg-word-color : #{$periwinki } ;
39
63
font-size : 1.4rem ;
40
64
}
41
65
.w7 {
@@ -59,5 +83,4 @@ section#cloud{
59
83
.w1 {
60
84
font-size : 0.7rem ;
61
85
}
62
-
63
- }
86
+ }
You can’t perform that action at this time.
0 commit comments