Ajax Loader
×
HTML
<div class="scene">
1
<div class="scene">
2
    <div class="mushroom walking">
3
        <div class="head">
4
            <div class="ball"></div>
5
        </div>
6
        <div class="face">
7
            <div class="eyes">
8
                <div class="left"></div>
9
                <div class="right"></div>
10
            </div>
11
        </div>
12
    </div>
13
    <div class="floor">
14
        <div class="tube">
15
            <div class="top-tube"></div>
16
        </div>
17
    </div>
18
</div>
 
CSS
$eyes-color: #303030;
1
$eyes-color: #303030;
2
$head-color: #F16F5C;
3
$face-color: #F3D4BA;
4
 
5
.scene {
6
    position: fixed;
7
    width:100%;
8
    height: 100%;
9
    bottom:0;
10
    padding-top: 20%;
11
    background: #259ad1;
12
    background: -moz-linear-gradient(top,  #259ad1 -24%, #FFF 123%);
13
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#259ad1), color-stop(100%,#FFF));
14
    background: -webkit-linear-gradient(top,  #259ad1 -24%,#FFF 123%);
15
    background: linear-gradient(to bottom,  #259ad1 -24%,#FFF 123%);    
16
}
17
.mushroom {
18
   position: absolute;
19
   width: 200px;
20
   height: 155px;
21
   z-index: 2;
22
  bottom: 112px;
23
   * { 
24
       Box-sizing: Border-box;
25
    }
26
  
27
  .head {
28
    width: 100%;
29
    height: 100%;
30
    overflow:hidden;
31
    border-radius: 100% 100% 90% 90%;
32
    background: -webkit-radial-gradient(100px 50px, circle, $head-color, ($head-color - 100));
33
    background: -moz-radial-gradient(100px 50px, circle, $head-color, ($head-color - 100));
34
    background: radial-gradient(100px 50px, circle, $head-color, ($head-color - 100));
35
        .ball {
36
            position: relative;
37
            width: 47%;
38
            height: 47%;
39
            background-color: rgba(255, 255, 255, 0.85);
40
            margin: 0 auto;
41
            border-radius: 100%;
42
            top: 10px;
43
            box-shadow: inset 0px -11px 24px -2px rgba(241, 111, 92, 0.44);
44
            
45
            &:before {
46
                content: "";
47
                position: relative;
48
                display: block;
49
                width: 50%;
50
                height: 80%;
51
                background-color: rgba(255, 255, 255, 0.85);
52
                margin: 0 auto;
53
                border-radius: 100%;
54
                top: 10px;
55
                left: -100px;
56
            }
57
            &:after {
58
                content: "";
59
                position: relative;
60
                display: block;
61
                width: 50%;
62
                height: 80%;
63
                background-color: rgba(255, 255, 255, 0.85);
64
                margin: 0 auto;
65
                border-radius: 100%;
66
                top: -20px;
67
                left: 100px;
68
            }
69
        }
70
  }
71
    
72
  .face {
73
    position: relative;
74
    bottom: 40%;
75
    margin: 0 auto;
76
    width: 50%;
77
    height: 50%;
78
    background-color: $face-color;
79
    border-radius: 50% 50% 41% 41%;
80
    box-shadow: inset 1px -6px 22px -7px rgba(0, 0, 0, .74), 
81
            inset 0px 7px 24px -7px rgba(207, 139, 53, 0.5),
82
            inset 0px -28px 24px -7px rgba(207, 139, 53, 0.5);
83
    border-top: 2px solid #7A121A;   
84
  }
85
  .eyes {
86
    position: absolute;
87
    top: 10px;
88
    left: 0;
89
    width: 100%;
90
    padding: 10% 33% 0  33%;
91
        
92
    > div {
93
        display: block;
94
        height: 25px;
95
        width: 10px;
96
        background-color: $eyes-color;
97
        border-radius: 20px;
98
        &:before {
99
            content:"";
100
            display: block;
101
            position: relative;
102
            left: 2px;
103
            top: 2px;
104
            height: 10px;
105
            width: 6px;
106
            background-color: rgba(255, 255, 255, 0.5);
107
            border-radius: 20px;
108
        }
109
        
110
        &.left {
111
            float: left;             
112
        }
113
        &.right {
114
            float: right;
115
        }
116
      }
117
    }    
118
}
119
 
120
.tube, .top-tube {
121
    position: absolute;
122
    bottom: 95px;
123
    right:7%;
124
    width:150px;
125
    height:200px;
126
    display:block;
127
    background: #1B991B;
128
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#1B991B), color-stop(17%, rgba(149, 233, 149, 0.82)), color-stop(28%,#52b152), color-stop(49%,#008a00), color-stop(74%,#005700));
129
    background: -webkit-linear-gradient(left,  #1B991B 0%, rgba(149, 233, 149, 0.82) 17%,#52b152 28%,#008a00 49%,#005700 74%);
130
    background: linear-gradient(to right,  #1B991B 0%, rgba(149, 233, 149, 0.82) 17%,#52b152 28%,#008a00 49%,#005700 74%);
131
}
132
 
133
.tube {
134
    box-shadow:inset 0px 3px 1px 0px #165816, inset 0px -36px 54px 6px rgba(32, 83, 32, 0.27);
135
}
136
 
137
.top-tube {
138
    width: 180px;
139
    height: 50px;
140
    top: -50px;
141
    margin-right: -25px;
142
    border-radius: 3px;
143
    box-shadow: inset 0 4px 2px -2px rgba(39, 165, 39, 0.46), 
144
        inset 0 3px 2px 1px rgba(12, 85, 12, .74), 
145
        inset 0 1px 2px 1px rgba(39, 165, 39, 0.74);
146
    
147
}
148
 
149
 
150
.floor {
151
    position:absolute;
152
    bottom: 0;
153
    border-radius: 3px;
154
    border: 1px solid #7E5E2E;
155
    background-color: #9E7537 ;
156
background-image: linear-gradient(45deg, #916B33 25%, transparent 25%, transparent 75%, #916B33 75%, #916B33), 
157
    linear-gradient(45deg, #916B33 25%, transparent 25%, transparent 75%, #916B33 75%, #916B33);
158
background-size:70px 70px;
159
background-position: 0 0, 35px 35px;
160
    
161
    width:100%;
162
    height: 80px;
163
    box-shadow: inset 0 2px 1px 2px #C09149, 
164
    inset 0 -31px 27px 5px rgba(109, 82, 42, 0.32);
165
    z-index:1;
166
    
167
    &:before {
168
        content:"";
169
        width:100%;
170
        height: 15px;
171
        position: relative;
172
        top: -15px;
173
        left:-1px;
174
        display: block;
175
        border-radius: 3px;
176
        border: 1px solid #7E5E2E;
177
        background-color: #9C773D;
178
        box-shadow: inset 0 4px 1px 2px #C09149;
179
    }
180
}
181
 
182
/* Animations */
183
 
184
@mixin animation-name($name) {
185
  -webkit-animation-name: $name;
186
  -moz-animation-name: $name;
187
  -ms-animation-name: $name;
188
  animation-name: $name;
189
}
190
 
191
@mixin animation-duration($name) {
192
  -webkit-animation-duration: $name;
193
  -moz-animation-duration: $name;
194
  -ms-animation-duration: $name;
195
  animation-duration: $name;
196
}
197
 
198
@mixin animation-timing-function($name) {
199
  -webkit-animation-timing-function: $name;
200
  -moz-animation-timing-function: $name;
201
  -ms-animation-timing-function: $name;
202
  animation-timing-function: $name;
203
}
204
 
205
@mixin animation-iteration-count($name) {
206
  -webkit-animation-iteration-count: $name;
207
  -moz-animation-iteration-count: $name;
208
  -ms-animation-iteration-count: $name;
209
  animation-iteration-count: $name;
210
}
211
 
212
@mixin animation-direction($name) {
213
  -webkit-animation-direction: $name;
214
  -moz-animation-direction: $name;
215
  -ms-animation-direction: $name;
216
  animation-direction: $name;
217
}
218
 
219
@mixin animation-delay($name) {
220
  -webkit-animation-delay: $name;
221
  -moz-animation-delay: $name;
222
  -ms-animation-delay: $name;
223
  animation-delay: $name;
224
}
225
 
226
@mixin animation-play-state($name) {
227
  -webkit-animation-play-state: $name;
228
  -moz-animation-play-state: $name;
229
  -ms-animation-play-state: $name;
230
  animation-play-state: $name;
231
}
232
 
233
@mixin animation-fill-mode($name) {
234
  -webkit-animation-fill-mode: $name;
235
  -moz-animation-fill-mode: $name;
236
  -ms-animation-fill-mode: $name;
237
  animation-fill-mode: $name;
238
}
239
 
240
@mixin keyframes($name) {
241
  @-webkit-keyframes $name { @content; }
242
  @-moz-keyframes $name { @content; }
243
  @-ms-keyframes $name { @content; }
244
  @keyframes $name { @content; }
245
}
246
  
247
@include keyframes (walk) {
248
  from {
249
    left:0%;
250
  }
251
  to {
252
    left:100%;
253
    margin-left: -436px;
254
  }
255
}
256
 
257
 
258
.walking {
259
    @include animation-direction(alternate);
260
    @include animation-fill-mode(forwards);
261
    @include animation-name(walk);
262
    @include animation-duration(3s);
263
    @include animation-timing-function (linear);
264
    @include animation-iteration-count (infinite);
265
}
266
    
 

Untitled

CSSDeck G+