Ajax Loader
×
HTML
<div class="container">
1
<div class="container">
2
  <div class="dontainer">
3
    :D
4
  </div>
5
</div>
 
CSS
html, body {
1
html, body {
2
  margin: 0;
3
}
4
.container {
5
  position: absolute;
6
  top: 0;
7
  bottom: 50%;
8
  width: 50%;
9
  left: 25%;
10
  outline: 1px solid red;
11
/* Uncomment for some mild awesomeness: */
12
/* transition: bottom 0.5s ease-out; */
13
}
14
  
15
.dontainer {
16
  position: absolute;
17
  bottom: 0;
18
  outline: 1px solid lime;
19
}
 
JavaScript
function doTheThing() {
1
function doTheThing() {
2
  var ce = document.querySelector(".container");
3
  ce.style.bottom = ce.style.bottom === "50%" ? "0%" : "50%";
4
}
5
 
6
setInterval(doTheThing, 1000);
 

Untitled

CSSDeck G+