37
37
top : 40% ;
38
38
left : 50% ;
39
39
transform : translate (-50% , -50% );
40
+ text-align : center;
40
41
}
41
42
42
43
.header {
53
54
color : # FFF ;
54
55
text-transform : uppercase;
55
56
backface-visibility : hidden; /* hide the background so that when children animates, it doesn't interfere */
57
+ margin-bottom : 60px ;
56
58
}
57
59
58
60
.heading-primary-main {
@@ -100,4 +102,68 @@ body {
100
102
opacity : 1 ;
101
103
transform : translate (0 ); /* reset to original */
102
104
}
105
+ }
106
+
107
+ @keyframes moveInBottom {
108
+ 0% {
109
+ opacity : 0 ;
110
+ transform : translateY (30px );
111
+ }
112
+ 100% {
113
+ opacity : 1 ;
114
+ transform : translate (0 ); /* reset to original */
115
+ }
116
+ }
117
+
118
+ .btn : link , .btn : visited {
119
+ text-transform : uppercase;
120
+ text-decoration : none;
121
+ padding : 15px 40px ;
122
+ display : inline-block;
123
+ border-radius : 100px ;
124
+ transition : all .2s ;
125
+ position : relative;
126
+ }
127
+
128
+ .btn : hover {
129
+ transform : translateY (-3px );
130
+ /* box-shadow: x-dir y-dir blur color */
131
+ box-shadow : 0 10px 20px rgba (0 , 0 , 0 , .2 );
132
+ }
133
+
134
+ .btn : active { /* clicked state */
135
+ transform : translateY (-1px ); /* minus 1 to initial state not to hover */
136
+ box-shadow : 0 5px 10px rgba (0 , 0 , 0 , .2 );
137
+ }
138
+
139
+ .btn-white {
140
+ background-color : # fff ;
141
+ color : # 777 ;
142
+ }
143
+
144
+ .btn ::after {
145
+ content : "" ;
146
+ display : inline-block;
147
+ height : 100% ;
148
+ width : 100% ;
149
+ border-radius : 100px ;
150
+ position : absolute;
151
+ top : 0 ;
152
+ left : 0 ;
153
+ z-index : -1 ;
154
+ transition : all .4s ;
155
+ }
156
+
157
+ .btn-white ::after {
158
+ background-color : # fff ;
159
+ }
160
+
161
+ .btn : hover ::after { /* apply style on hover::after*/
162
+ transform : scaleX (1.4 ) scaleY (1.6 );
163
+ opacity : 0 ;
164
+ }
165
+
166
+ .btn-animated {
167
+ animation : moveInBottom .5s ease-out .75s ;
168
+ animation-fill-mode : backwards; /* apply all initial 0% state of the animation before the animation starts */
103
169
}
0 commit comments