Ajax Loader
×
HTML
<ul class="box">
1
<ul class="box">
2
  <li>Label one<div class="title">title one</div>
3
  </li>
4
  <li>Label two<div class="title">title one</div></li>
5
  <li>Label three<div class="title">title one</div></li>
6
  <li>Label four<div class="title">title one</div></li>
7
  <li>Label five<div class="title">title one</div></li>
8
  <li>Label six<div class="title">title one</div></li>
9
</ul>
10
 
 
CSS
 .box {
1
 .box {
2
  position: relative;
3
  z-index: 1;
4
  width: 990px;
5
  list-style: none;
6
  margin: 10px auto ;
7
  padding: 0;
8
  overflow: hidden;
9
}
10
.box li {
11
  position: relative;
12
  float: left;
13
  margin: 0 30px 30px 20px;
14
  padding: 0;
15
  width: 250px;
16
  height: 150px;
17
  line-height: 150px;
18
  background: #fff;
19
  border: 1px solid #efefef;
20
  -webkit-box-shadow: inset 0 0 40px rgba(0,0,0,0.06), 0 1px 4px rgba(0, 0, 0, .27);
21
  -moz-box-shadow: inset 0 0 40px rgba(0,0,0,0.06), 0 1px 4px rgba(0, 0, 0, .27);
22
  box-shadow: inset 0 0 40px rgba(0,0,0,0.06), 0 1px 4px rgba(0, 0, 0, .27);
23
  text-align: center;
24
  overflow: hidden;
25
}
26
.box li:before, .box li:after {
27
  content: '';
28
  position: absolute;
29
  left: 10px;
30
  bottom: 10px;
31
  z-index: -1;
32
  width: 70%;
33
  height: 55%;
34
  max-width: 300px;
35
  max-height: 100px;
36
  -webkit-box-shadow: 0 8px 16px rgba(0, 0,0, .3);
37
  -moz-box-shadow: 0 8px 16px rgba(0, 0,0, .3);
38
  box-shadow: 0 8px 16px rgba(0, 0,0, .3);
39
  -webkit-transform: skew(-15deg) rotate(-6deg);
40
  -moz-transform: skew(-15deg) rotate(-6deg);
41
  -ms-transform: skew(-15deg) rotate(-6deg);
42
  -o-transform: skew(-15deg) rotate(-6deg);
43
  transform: skew(-15deg) rotate(-6deg);
44
}
45
.box li:after {
46
  right: 10px;
47
  left: auto;
48
  -webkit-transform: skew(15deg) rotate(6deg);
49
  -moz-transform: skew(15deg) rotate(6deg);;
50
  -ms-transform: skew(15deg) rotate(6deg);;
51
  -o-transform: skew(15deg) rotate(6deg);;
52
  transform: skew(15deg) rotate(6deg);;
53
  
54
}
55
.title  {
56
  position: absolute;
57
  z-index: 2;
58
/*   display: none; */
59
  left: 0;
60
  bottom: -25px;
61
  width: 100%;
62
  height: 25px;
63
  line-height: 25px;
64
  background: rgba(0, 0, 0, .3);
65
  -webkit-transition: all 0.2s ease-in;
66
  -moz-transition: prop time;
67
  -ms-transition: prop time;
68
  -o-transition: prop time;
69
  transition: prop time;
70
}
 
JavaScript
(function() {
1
(function() {
2
  var uls = document.getElementsByClassName("box");
3
  for (var i = 0; i < uls.length; i++) {
4
    var lis = uls[i].getElementsByTagName("li");
5
    for (var j = 0; j < lis.length; j++) {
6
      lis[j].onmouseover = function() {
7
<!--         this.style.backgroundColor = "#ff9800"; -->
8
        this.getElementsByTagName("div")[0].style.bottom = "0";
9
      };
10
      lis[j].onmouseout = function() {
11
        this.style.backgroundColor = "#fff";
12
         this.getElementsByTagName("div")[0].style.bottom = "-25px";
13
      };
14
    }
15
  }
16
})();
 

Untitled

CSSDeck G+