Ajax Loader
×
HTML
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
1
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
2
<section class="container">
3
  <ul class="tags">
4
    <li><a href="#" data-tag-count="4">Interface</a></li>
5
    <li><a href="#" data-tag-count="8">Icon</a></li>
6
    <li><a href="#" data-tag-count="15">Typography</a></li>
7
    <li><a href="#" data-tag-count="16">Color</a></li>
8
  </ul>
9
  
10
  <ul class="tags green">
11
    <li><a href="#" data-tag-count="23">Design</a></li>
12
    <li><a href="#" data-tag-count="42">Illustration</a></li>
13
    <li><a href="#" data-tag-count="108">Component</a></li>
14
    <li><a href="#" data-tag-count="12">Misc</a></li>
15
  </ul>
16
  
17
  <ul class="tags blue">
18
    <li><a href="#" data-tag-count="31">Infrastructure</a></li>
19
    <li><a href="#" data-tag-count="33">Application</a></li>
20
    <li><a href="#" data-tag-count="65">Mobile</a></li>
21
    <li><a href="#" data-tag-count="160">Desktop</a></li>
22
  </ul>
23
</section>
24
 
 
CSS
@import compass/reset
1
@import compass/reset
2
+global-reset
3
 
4
/*
5
 * Copyright (c) 2012-2013 Thibaut Courouble
6
 * http://www.webinterfacelab.com
7
 *
8
 * Pseudo elements remix by Andrii Korzh 2013
9
 *
10
 * Licensed under the MIT License:
11
 * http://www.opensource.org/licenses/mit-license.php
12
 */
13
 
14
$tagsHeight: 26px
15
$tagsDefaultColor: #eb6b22
16
$tagsColors: green #65bb34, blue #56a3d5
17
$tagsCountAttr: data-tag-count
18
 
19
body 
20
  font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif
21
  color: #404040
22
  background: #eee
23
 
24
 
25
.container 
26
  margin: 50px auto
27
  width: 400px
28
 
29
 
30
.tags 
31
  +clearfix
32
 
33
  li 
34
    position: relative
35
    float: left
36
    margin: 0 0 8px 12px
37
 
38
    &:active 
39
      margin-top: 1px
40
      margin-bottom: 7px
41
    
42
 
43
    &:after 
44
      content: ''
45
      z-index: 2
46
      position: absolute
47
      top: round($tagsHeight / 2 - 3px)
48
      right: -2px
49
      width: 5px
50
      height: 6px
51
      opacity: .95
52
      background: $tagsDefaultColor
53
      border-radius: 3px 0 0 3px
54
      +box-shadow(inset 1px 0 darken($tagsDefaultColor, 20%))
55
 
56
  a, a:before 
57
    display: block
58
    +box-sizing(border-box)
59
 
60
  a 
61
    height: $tagsHeight
62
    line-height: $tagsHeight - 3px
63
    padding: 0 9px 0 8px
64
    font-size: 12px
65
    color: #555
66
    text-decoration: none
67
    text-shadow: 0 1px white
68
    border-width: 1px 0 1px 1px
69
    border-style: solid
70
    border-color: #dadada #d2d2d2 #c5c5c5
71
    border-radius: 3px 0 0 3px
72
    +background(linear-gradient(top, #fcfcfc, #f0f0f0), #fafafa)
73
    +box-shadow(inset 0 0 0 1px rgba(white, .7), 0 1px 2px rgba(black, .05))
74
 
75
    &:hover:before 
76
      padding: 0 7px 0 6px
77
      max-width: 40px
78
      +box-shadow(inset 0 0 0 1px rgba(white, .15), 1px 1px 2px rgba(black, .2))
79
 
80
 
81
  a:before 
82
    content: attr($tagsCountAttr)
83
    position: absolute
84
    top: 1px
85
    left: 100%
86
    z-index: 2
87
    overflow: hidden
88
    max-width: 0
89
    height: $tagsHeight - 2px
90
    line-height: $tagsHeight - 5px
91
    padding: 0 0 0 2px
92
    color: white
93
    text-shadow: 0 -1px rgba(black, .3)
94
    border: 1px solid
95
    border-color: darken($tagsDefaultColor, 8%) darken($tagsDefaultColor, 10%) darken($tagsDefaultColor, 12%)
96
    border-radius: 0 2px 2px 0
97
    opacity: .95
98
    +background(linear-gradient(top, lighten($tagsDefaultColor, 5%), darken($tagsDefaultColor, 5%)), $tagsDefaultColor)
99
    +transition(.3s ease-out)
100
    +transition-property(padding, max-width)
101
 
102
@each $pair in $tagsColors 
103
  .#{nth($pair, 1)} 
104
    $color: nth($pair, 2)
105
 
106
    li:after 
107
      background: $color
108
      +box-shadow(inset 1px 0 darken($color, 20%))
109
    
110
 
111
    a:before 
112
      border-color: darken($color, 8%) darken($color, 10%) darken($color, 12%)
113
      +background(linear-gradient(top, lighten($color, 5%), darken($color, 5%)), $color)
114
 
 

Tag cloud remix

CSSDeck G+