Ajax Loader
×

Animated Content tab

Once again it's me immanuel.r u like is tab.then just like us on fb.com/heartcheaserstrick

HTML
<section class="tabs">
1
<section class="tabs">
2
    <input id="tab-1" type="radio" name="radio-set" class="tab-selector-1" checked="checked" />
3
    <label for="tab-1" class="tab-label-1">About</label>
4
     
5
    <input id="tab-2" type="radio" name="radio-set" class="tab-selector-2" />
6
    <label for="tab-2" class="tab-label-2">Hit me</label>
7
     
8
    <input id="tab-3" type="radio" name="radio-set" class="tab-selector-3" />
9
    <label for="tab-3" class="tab-label-3">Not me</label>
10
     
11
    <input id="tab-4" type="radio" name="radio-set" class="tab-selector-4" />
12
    <label for="tab-4" class="tab-label-4">Hello</label>
13
             
14
    <div class="clear-shadow"></div>
15
                 
16
    <div class="content">
17
        <div class="content-1">
18
            <p>Hello friend how is the tab.My Name is Immanuel who created this awsome tab</p>
19
        </div>
20
        <div class="content-2">
21
            <p>Next, we will make the labels look like tabs by defining some neat style for them. Note that each of the labels has a different z-index. A box-shadow will add depth and realism to the tabs.</p>
22
        </div>
23
        <div class="content-3">
24
            <p>Some content</p>
25
        </div>
26
        <div class="content-4">
27
            <p>Some content</p>
28
        </div>
29
    </div>
30
</section>
 
CSS
.tabs {
1
.tabs {
2
    position: relative;
3
  margin: 40px auto;
4
  width: 750px;
5
}
6
 
7
.tabs input {
8
  position: absolute;
9
  z-index: 1000;
10
  width: 120px;
11
  height: 40px;
12
  left: 0px;
13
  top: 0px;
14
  opacity: 0;
15
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
16
    filter: alpha(opacity=0);
17
  cursor: pointer;
18
}
19
.tabs input#tab-2{
20
  left: 120px;
21
}
22
.tabs input#tab-3{
23
  left: 240px;
24
}
25
.tabs input#tab-4{
26
  left: 360px;
27
}
28
 
29
.tabs label {
30
  background: #5ba4a4;
31
  background: -moz-linear-gradient(top, #5ba4a4 0%, #4e8c8a 100%);
32
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5ba4a4), color-stop(100%,#4e8c8a));
33
  background: -webkit-linear-gradient(top, #5ba4a4 0%,#4e8c8a 100%);
34
  background: -o-linear-gradient(top, #5ba4a4 0%,#4e8c8a 100%);
35
  background: -ms-linear-gradient(top, #5ba4a4 0%,#4e8c8a 100%);
36
  background: linear-gradient(top, #5ba4a4 0%,#4e8c8a 100%);
37
  font-size: 15px;
38
  line-height: 40px;
39
  height: 40px;
40
  position: relative;
41
  padding: 0 20px;
42
    float: left;
43
  display: block;
44
  width: 80px;
45
  color: #385c5b;
46
  letter-spacing: 1px;
47
  text-transform: uppercase;
48
  font-weight: bold;
49
  text-align: center;
50
  text-shadow: 1px 1px 1px rgba(255,255,255,0.3);
51
    border-radius: 3px 3px 0 0;
52
    box-shadow: 2px 0 2px rgba(0,0,0,0.1), -2px 0 2px rgba(0,0,0,0.1);
53
}
54
 
55
.tabs label:after {
56
    content: '';
57
  background: #fff;
58
  position: absolute;
59
  bottom: -2px;
60
  left: 0;
61
  width: 100%;
62
  height: 2px;
63
  display: block;
64
}
65
 
66
.tabs input:hover + label {
67
  background: #5ba4a4;
68
}
69
 
70
.tabs label:first-of-type {
71
    z-index: 4;
72
    box-shadow: 2px 0 2px rgba(0,0,0,0.1);
73
}
74
 
75
.tab-label-2 {
76
    z-index: 3;
77
}
78
 
79
.tab-label-3 {
80
    z-index: 2;
81
}
82
 
83
.tab-label-4 {
84
    z-index: 1;
85
}
86
 
87
.tabs input:checked + label {
88
    background: #fff;
89
  z-index: 6;
90
}
91
 
92
.clear-shadow {
93
  clear: both;
94
}
95
 
96
.content {
97
    background: #fff;
98
  position: relative;
99
    width: 100%;
100
  height: 370px;
101
  z-index: 5;
102
    box-shadow: 0 -2px 3px -2px rgba(0,0,0,0.2), 0 2px 2px rgba(0,0,0,0.1);
103
    border-radius: 0 3px 3px 3px;
104
}
105
 
106
.content div {
107
    position: absolute;
108
  top: 0;
109
  left: 0;
110
  padding: 10px 40px;
111
  z-index: 1;
112
    opacity: 0;
113
 
114
    -webkit-transition: opacity linear 0.1s;
115
    -moz-transition: opacity linear 0.1s;
116
    -o-transition: opacity linear 0.1s;
117
    -ms-transition: opacity linear 0.1s;
118
    transition: opacity linear 0.1s;
119
}
120
 
121
.tabs input.tab-selector-1:checked ~ .content .content-1,
122
.tabs input.tab-selector-2:checked ~ .content .content-2,
123
.tabs input.tab-selector-3:checked ~ .content .content-3,
124
.tabs input.tab-selector-4:checked ~ .content .content-4 {
125
  z-index: 100;
126
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
127
    filter: alpha(opacity=100);
128
    opacity: 1;
129
 
130
    -webkit-transition: opacity ease-out 0.2s 0.1s;
131
    -moz-transition: opacity ease-out 0.2s 0.1s;
132
    -o-transition: opacity ease-out 0.2s 0.1s;
133
    -ms-transition: opacity ease-out 0.2s 0.1s;
134
    transition: opacity ease-out 0.2s 0.1s;
135
}
136
.content div h2,
137
.content div h3{
138
  color: #398080;
139
}
140
.content div p {
141
  font-size: 14px;
142
  line-height: 22px;
143
  font-style: italic;
144
  text-align: left;
145
  margin: 0;
146
  color: #777;
147
  padding-left: 15px;
148
  font-family: Cambria, Georgia, serif;
149
  border-left: 8px solid rgba(63,148,148, 0.1);
150
}
 
JavaScript
/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
1
/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
2
 * Build: http://www.modernizr.com/download/#-shiv-cssclasses-load
3
 */
4
;window.Modernizr=function(a,b,c){function u(a){j.cssText=a}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function w(a,b){return typeof a===b}function x(a,b){return!!~(""+a).indexOf(b)}function y(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:w(f,"function")?f.bind(d||b):f}return!1}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m={},n={},o={},p=[],q=p.slice,r,s={}.hasOwnProperty,t;!w(s,"undefined")&&!w(s.call,"undefined")?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e});for(var z in m)t(m,z)&&(r=z.toLowerCase(),e[r]=m[z](),p.push((e[r]?"":"no-")+r));return u(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+p.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
 

Animated Content tab

CSSDeck G+