Latest News

Tuesday, 23 December 2014

Animated Bar Chart with CSS3

Add a Animated Bar Chart with CSS3 Transitions on website or blogger. Let us follow the below steps.
Step 1: Go to Blogger Click the Dashboard then
Step 2: Now Click on Template->Edit HTML-> Proceed
Step 3: Now Find this code ]]></b:skin> by pressing Ctrl + F
Step 4: Copy the code from below and Paste it  Before/above ]]></b:skin>
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
    display: block;
}

audio,
canvas,
video {
    display: inline-block;
    *display: inline;
    *zoom: 1;
}


audio:not([controls]) {
    display: none;
    height: 0;
}


[hidden] {
    display: none;
}


html {
    font-size: 100%; /* 1 */
    -webkit-text-size-adjust: 100%; /* 2 */
    -ms-text-size-adjust: 100%; /* 2 */
}


html,
button,
input,
select,
textarea {
    font-family: sans-serif;
}


body {
    margin: 0;
}


a:focus {
    outline: thin dotted;
}


a:hover,
a:active {
    outline: 0;
}


h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

h2 {
    font-size: 1.5em;
    margin: 0.83em 0;
}

h3 {
    font-size: 1.17em;
    margin: 1em 0;
}

h4 {
    font-size: 1em;
    margin: 1.33em 0;
}

h5 {
    font-size: 0.83em;
    margin: 1.67em 0;
}

h6 {
    font-size: 0.75em;
    margin: 2.33em 0;
}


abbr[title] {
    border-bottom: 1px dotted;
}


b,
strong {
    font-weight: bold;
}

blockquote {
    margin: 1em 40px;
}


dfn {
    font-style: italic;
}


mark {
    background: #ff0;
    color: #000;
}


p,
pre {
    margin: 1em 0;
}


pre,
code,
kbd,
samp {
    font-family: monospace, serif;
    _font-family: 'courier new', monospace;
    font-size: 1em;
}


pre {
    white-space: pre;
    white-space: pre-wrap;
    word-wrap: break-word;
}


q {
    quotes: none;
}


q:before,
q:after {
    content: '';
    content: none;
}

small {
    font-size: 75%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}


dl,
menu,
ol,
ul {
    margin: 1em 0;
}

dd {
    margin: 0 0 0 40px;
}


menu,
ol,
ul {
    padding: 0 0 0 40px;
}


nav ul,
nav ol {
    list-style: none;
    list-style-image: none;
}


img {
    border: 0; /* 1 */
    -ms-interpolation-mode: bicubic; /* 2 */
}


svg:not(:root) {
    overflow: hidden;
}


figure {
    margin: 0;
}


form {
    margin: 0;
}


fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
}


legend {
    border: 0; /* 1 */
    padding: 0;
    white-space: normal; /* 2 */
    *margin-left: -7px; /* 3 */
}

button,
input,
select,
textarea {
    font-size: 100%; /* 1 */
    margin: 0; /* 2 */
    vertical-align: baseline; /* 3 */
    *vertical-align: middle; /* 3 */
}



button,
input {
    line-height: normal; /* 1 */
}


button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    cursor: pointer; /* 1 */
    -webkit-appearance: button; /* 2 */
    *overflow: visible;  /* 3 */
}


button[disabled],
input[disabled] {
    cursor: default;
}

input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
    *height: 13px; /* 3 */
    *width: 13px; /* 3 */
}


input[type="search"] {
    -webkit-appearance: textfield; /* 1 */
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box; /* 2 */
    box-sizing: content-box;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}


button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}


textarea {
    overflow: auto; /* 1 */
    vertical-align: top; /* 2 */
}


table {
    border-collapse: collapse;
    border-spacing: 0;
}

 * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; };
/* General Demo Style */
body{
 font-family: 'Open Sans Condensed','Arial Narrow', serif;
 background: #ddd url(../img/bg.png) repeat top left;
 font-weight: 400;
 font-size: 15px;
 color: #333;
 overflow-y: scroll;
}
a{
 color: #555;
 text-decoration: none;
}
.container{
 width: 100%;
 position: relative;
}
.main{
 text-align: center;
 width: 100%;
 background: rgba(0,0,0,0.03);
 padding: 30px 50px 50px 50px;
 margin: 0 auto 30px auto;
 border: 1px solid rgba(255,255,255,0.8);
 box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
}
.clr{
 clear: both;
 padding: 0;
 height: 0;
 margin: 0;
}
.container > header{
 margin: 10px;
 padding: 20px 10px 10px 10px;
 position: relative;
 display: block;
 text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
    text-align: center;
}
.container > header h1{
 font-size: 36px;
 line-height: 40px;
 margin: 0;
 position: relative;
 font-weight: 300;
 color: #888;
 padding: 5px 0px;
 text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
}
.container > header h1 span{
 font-weight: 700;
}
.container > header p{
 font-style: italic;
 color: #aaa;
 text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
}
/* Header Style */
.Blogsitedesigns-top{
 line-height: 24px;
 font-size: 11px;
 background: #fff;
 background: rgba(255, 255, 255, 0.6);
 text-transform: uppercase;
 z-index: 9999;
 position: relative;
 font-family: Cambria, Georgia, serif;
 box-shadow: 1px 0px 2px rgba(0,0,0,0.2);
}
.Blogsitedesigns-top a{
 padding: 0px 10px;
 letter-spacing: 1px;
 color: #333;
 display: inline-block;
}
.Blogsitedesigns-top a:hover{
 background: rgba(255,255,255,0.9);
}
.Blogsitedesigns-top span.right{
 float: right;
}
.Blogsitedesigns-top span.right a{
 float: left;
 display: block;
}
.ie-note{
 color: #ac375d;
 display: none;
 font-size: 15px;
}
/*********************
 * Graph Holder styles *
 *********************/

/** Graph Holder container **/
.graph-container {
    position: relative; /* required Y axis stuff, Graph Holder's left and bottom sides to be positions properly */
    display: inline-block; /* display: table may also work.. */
    padding: 0; /* let the bars position themselves */
    list-style: none; /* we don't want to see any default <ul> markers */
 margin: 40px 0 0 40px;
 font-size: 0.8em;
    /* Graph Holder's Background */
    background-image: -webkit-linear-gradient(left , rgba(255, 255, 255, .3) 100%, transparent 100%);
    background-image: -moz-linear-gradient(left , rgba(255, 255, 255, .3) 100%, transparent 100%);
    background-image: -o-linear-gradient(left , rgba(255, 255, 255, .3) 100%, transparent 100%);
    background-image: -ms-linear-gradient(left , rgba(255, 255, 255, .3) 100%, transparent 100%);
    background-image: linear-gradient(left , rgba(255, 255, 255, .3) 100%, transparent 100%);
    background-repeat: no-repeat;
    background-position: 0 -2.5em;
}

/* Graph Holder bottom side */
.graph-container:before {
    position: absolute;
    content: "";

    bottom: 0;
    left: -1.25em; /* skew pushes it left, so we move it a bit in opposite direction */

    width: 100%; /* make sure it is as wide as the whole graph */

    height: 2.5em;
    background-color: rgba(183, 183, 183, 1);

    /* Make it look perspective */
    -webkit-transform: skew(-45deg);
    -moz-transform: skew(-45deg);
    -o-transform: skew(-45deg);
    -ms-transform: skew(-45deg);
    transform: skew(-45deg);
}

/* Graph Holder left side */
.graph-container:after {
    position: absolute;
    content: "";

    top: 1.25em; /* skew pushes it up so we move it down a bit */
    left: -2.5em;

    width: 2.5em;
    background-color: rgba(129, 129, 129, 0.4);

    /* Make it look perspective */
    -webkit-transform: skew(0deg, -45deg);
    -moz-transform: skew(0deg, -45deg);
    -o-transform: skew(0deg, -45deg);
    -ms-transform: skew(0deg, -45deg);
    transform: skew(0deg, -45deg);
}

/* Bars and X-axis labels holder */
.graph-container > li {
    float: left; /* Make sure bars are aligned one next to another */
    position: relative; /* Make sure X-axis labels are positioned relative to this element */
}
/* A small hack to make Graph Holder's background side be wide enough
   ..because our bottom side is skewed and pushed to the right, we have to compensate it in Graph Holder's background */
.graph-container > li:nth-last-child(2) {
    margin-right: 2.5em;
}
/* X-axis labels */
.graph-container > li > span {
    position: absolute;
    left: 0;
    bottom: -2em;
    width: 80%; /* play with this one if you change perspective depth */
    text-align: center;
 font-weight: bold;
 text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
 color: #777;
    font-size: 1.5em;
}

/*******************************
 * Graph Y-axis Markers styles *
 *******************************/

/* Markers container */
.graph-container > li:last-child {
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
}

/* Y-axis Markers list */
.graph-marker-container > li {
    position: absolute;
    left: -2.5em;
    bottom: 0;
    width: 100%;
    margin-bottom: 2.5em;
    list-style: none;
}

/* Y-axis lines general styles */
.graph-marker-container > li:before,
.graph-marker-container > li:after {
    content: "";
    position: absolute;
    border-style: none none dotted;
    border-color: rgba(100, 100, 100, .15);
    border-width: 0 0 .15em;
    background: rgba(133, 133, 133, .15);
}

/* Y-axis Side line */
.graph-marker-container > li:before {
    width: 3.55em;
    height: 0;
    bottom: -1.22em;
    left: -.55em;
    z-index: 2; /* be above .graph-container:after */

    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

/* Y-axis Background line */
.graph-marker-container li:after {
    width: 100%;
    bottom: 0;
    left: 2.5em;
}

/* Y-axis text Label */
.graph-marker-container span {
    position: absolute;
 font-weight: bold;
 text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
    top: 1em;
    left: -3.5em; /* just to push it away from the graph.. */
    width: 3.5em; /* give it absolute value of left offset */

    font-size: 1.5em;
}

/*********************
 * Graph Bars styles *
 *********************/

/* Bar wrapper - hides the inner bar when it goes below the bar, required */
.bar-wrapper {
    overflow: hidden;
}
/* Bar container - this guy is a real parent of a bar's parts - they all are positioned relative to him */
.bar-container {
    position: relative;
    margin-top: 2.5em; /* should be at least equal to the top offset of background casing */
    /* because back casing is positioned higher than actual bar */
    width: 12.5em; /* required, we have to define the width of a bar */
}
/* right bottom patch - make sure inner bar's right bottom corner is "cut" when it slides down */
.bar-container:before {
    content: "";
    position: absolute;
    z-index: 3; /* to be above .bar-inner */

    bottom: 0;
    right: 0;

    /* Use bottom border to shape triangle */
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 2.5em 2.5em;
    border-color: transparent transparent rgba(183,183,183,1);
}

/** BACK CASING **/
/* Back panel */
.bar-background {
    width: 10em;
    height: 100%;
    position: absolute;
    top: -2.5em;
    left: 2.5em;
    z-index: 1; /* just for reference */
}

.bar-background:before,
.bar-background:after {
    content: "";
    position: absolute;
}

/* Bottom panel */
.bar-background:before {
    bottom: -2.5em;
    right: 1.25em;
    width: 10em;
    height: 2.5em;
 -webkit-backface-visibility: hidden;
    -webkit-transform: skew(-45deg);
    -moz-transform: skew(-45deg);
    -o-transform: skew(-45deg);
    -ms-transform: skew(-45deg);
    transform: skew(-45deg);
}

/* Left back panel */
.bar-background:after {
    top: 1.25em;
    right: 10em;
    width: 2.5em;
    height: 100%;
 -webkit-backface-visibility: hidden;
    /* skew only the Y-axis */
    -webkit-transform: skew(0deg, -45deg);
    -moz-transform: skew(0deg, -45deg);
    -o-transform: skew(0deg, -45deg);
    -ms-transform: skew(0deg, -45deg);
    transform: skew(0deg, -45deg);
}

/** FRONT CASING **/
/* Front panel */
.bar-foreground {
    z-index: 3; /* be above .bar-background and .bar-inner */
}
.bar-foreground,
.bar-inner {
    position: absolute;
    width: 10em;
    height: 100%;
    top: 0;
    left: 0;
}

.bar-foreground:before,
.bar-foreground:after,
.bar-inner:before,
.bar-inner:after {
    content: "";
    position: absolute;
}

/* Right front panel */
.bar-foreground:before,
.bar-inner:before {
    top: -1.25em;
    right: -2.5em;
    width: 2.5em;
    height: 100%;
    background-color: rgba(160, 160, 160, .27);

    -webkit-transform: skew(0deg, -45deg);
    -moz-transform: skew(0deg, -45deg);
    -o-transform: skew(0deg, -45deg);
    -ms-transform: skew(0deg, -45deg);
    transform: skew(0deg, -45deg);
}

/* Top front panel */
.bar-foreground:after,
.bar-inner:after {
    top: -2.5em;
    right: -1.25em;
    width: 100%;
    height: 2.5em;
    background-color: rgba(160, 160, 160, .2);

    -webkit-transform: skew(-45deg);
    -moz-transform: skew(-45deg);
    -o-transform: skew(-45deg);
    -ms-transform: skew(-45deg);
    transform: skew(-45deg);
}

/** BAR's inner block **/
.bar-inner {
    z-index: 2; /* to be above .bar-background */
    top: auto; /* reset position top */
    background-color: rgba(5, 62, 123, .6);
    height: 0;
    bottom: -2.5em;
    color: transparent; /* hide text values */

    -webkit-transition: height 0.8s ease-out, bottom 0.8s ease-out;
    -moz-transition: height 0.8s ease-out, bottom 0.8s ease-out;
    -o-transition: height 0.8s ease-out, bottom 0.8s ease-out;
    -ms-transition: height 0.8s ease-out, bottom 0.8s ease-out;
    transition: height 0.8s ease-out, bottom 0.8s ease-out;
}

/* Right panel */
.bar-inner:before {
    background-color: rgba(5, 62, 123, .6);
}

/* Top panel */
.bar-inner:after {
    background-color: rgba(47, 83, 122, .7);
}

/******************************************************************************
 **                                                                          **
 ** UI Elements                                                              **
 **                                                                          **
 ** You don't need this stuff in general, it's just used  for the demo page  **
 **                                                                          **
 ******************************************************************************/

/****************
 * FILL BUTTONS  *
 ****************/
input[name^="fill-"] {
    width: 65px;
 height: 25px;
 position: absolute;
 opacity: 0;
 cursor: pointer;
 z-index: 100;
}

input[name^="fill-"] + label {
 display: inline-block;
 margin: 0px;
 width: 65px;
 padding: 0px 6px;
 color: #777;
 line-height: 20px;
 font-size: 13px;
 text-shadow: 1px 1px 1px #fff;
 border: 1px solid #fff;
 background: #ffffff; /* Old browsers */
 background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
 background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
 background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
 background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
 background: linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
 box-shadow: 0px 1px 1px rgba(0,0,0,0.3);
}
input[name^="fill-"]:checked + label {
    background: rgba(34, 35, 36, .7);
 border-color: #333;
 color: #fff;
 text-shadow: none;
 box-shadow: 0px 1px 1px rgba(255,255,255, 0.4);
}

/* Change bars fill when a Product is selected */
/* None */
input#f-none:checked ~ .graph-container > li:nth-child(1) .bar-inner { height: 0; bottom: -2.5em; }
input#f-none:checked ~ .graph-container > li:nth-child(2) .bar-inner { height: 0; bottom: -2.5em; }
input#f-none:checked ~ .graph-container > li:nth-child(3) .bar-inner { height: 0; bottom: -2.5em; }
input#f-none:checked ~ .graph-container > li:nth-child(4) .bar-inner { height: 0; bottom: -2.5em; }
input#f-none:checked ~ .graph-container > li:nth-child(5) .bar-inner { height: 0; bottom: -2.5em; }
/* Product 1 */
input#f-product1:checked ~ .graph-container > li:nth-child(1) .bar-inner { height: 25%; bottom: 0; }
input#f-product1:checked ~ .graph-container > li:nth-child(2) .bar-inner { height: 50%; bottom: 0; }
input#f-product1:checked ~ .graph-container > li:nth-child(3) .bar-inner { height: 75%; bottom: 0; }
input#f-product1:checked ~ .graph-container > li:nth-child(4) .bar-inner { height: 100%; bottom: 0; }
input#f-product1:checked ~ .graph-container > li:nth-child(5) .bar-inner { height: 50%; bottom: 0; }
/* Product 2 */
input#f-product2:checked ~ .graph-container > li:nth-child(1) .bar-inner { height: 50%; bottom: 0; }
input#f-product2:checked ~ .graph-container > li:nth-child(2) .bar-inner { height: 100%; bottom: 0; }
input#f-product2:checked ~ .graph-container > li:nth-child(3) .bar-inner { height: 25%; bottom: 0; }
input#f-product2:checked ~ .graph-container > li:nth-child(4) .bar-inner { height: 75%; bottom: 0; }
input#f-product2:checked ~ .graph-container > li:nth-child(5) .bar-inner { height: 100%; bottom: 0; }
/* Product 3 */
input#f-product3:checked ~ .graph-container > li:nth-child(1) .bar-inner { height: 25%; bottom: 0; }
input#f-product3:checked ~ .graph-container > li:nth-child(2) .bar-inner { height: 75%; bottom: 0; }
input#f-product3:checked ~ .graph-container > li:nth-child(3) .bar-inner { height: 100%; bottom: 0; }
input#f-product3:checked ~ .graph-container > li:nth-child(4) .bar-inner { height: 50%; bottom: 0; }
input#f-product3:checked ~ .graph-container > li:nth-child(5) .bar-inner { height: 25%; bottom: 0; }


/****************
 * COLOR BUTTONS  *
 ****************/
input[name^="paint-"] {
    width: 25px;
 height: 25px;
 position: absolute;
 opacity: 0;
 cursor: pointer;
 z-index: 100;
}
/* unselected color switch */
input[name^="paint-"] + label {
    color: #989da4;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    width: 25px;
    height: 25px;
    overflow: hidden;
    background: rgba(34, 35, 36, .7);/*#171b20;*/
    margin: 0 2px -7px;

    position: relative;
    cursor: pointer;
    color: transparent;

 box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 1px 1px 3px rgba(0,0,0,0.3);
    text-align: center;
}

#graph-blue + label {
 background: #2972c3;
    background: -webkit-radial-gradient(rgba(39, 118, 205, 1), rgba(44, 106, 174, .9));
    background: -moz-radial-gradient(rgba(39, 118, 205, 1), rgba(44, 106, 174, .9));
    background: -o-radial-gradient(rgba(39, 118, 205, 1), rgba(44, 106, 174, .9));
    background: -ms-radial-gradient(rgba(39, 118, 205, 1), rgba(44, 106, 174, .9));
    background: radial-gradient(rgba(39, 118, 205, 1), rgba(44, 106, 174, .9));
}

#graph-green + label {
 background: #5f9a3f;
    background: -webkit-radial-gradient(rgba(98, 160, 60, .9), rgba(43, 148, 48, 1));
    background: -moz-radial-gradient(rgba(98, 160, 60, .9), rgba(43, 148, 48, 1));
    background: -o-radial-gradient(rgba(98, 160, 60, .9), rgba(43, 148, 48, 1));
    background: -ms-radial-gradient(rgba(98, 160, 60, .9), rgba(43, 148, 48, 1));
    background: radial-gradient(rgba(98, 160, 60, .9), rgba(43, 148, 48, 1));
}

#graph-rainbow + label {
    background: transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmki49ZN_4lkBCYEuMDX7kEBKLmCq-AVy6QNKDSnXWfc_hO1ewGQlmMZUIogrplTilyxRvuXx_RNfHYO0TUuv7p8dg9XEFy_snFcU5sAGnBMNLwj0_zz9YUu6IaPfnRD0CWkUOoyEZG7s/s1600/rainbow.gif) no-repeat;
}

#graph-green:checked + label,
#graph-blue:checked + label,
#graph-rainbow:checked + label {
 box-shadow: 0 0 0 2px rgba(255,255,255,0.7), 1px 1px 3px rgba(0,0,0,0.3);
}


input#graph-blue:checked ~ .graph-container .bar-inner,
input#graph-blue:checked ~ .graph-container .bar-inner:before { background-color: rgba(5, 62, 123, .6); }
input#graph-blue:checked ~ .graph-container .bar-inner:after { background-color: rgba(47, 83, 122, .7); }

input#graph-green:checked ~ .graph-container .bar-inner,
input#graph-green:checked ~ .graph-container .bar-inner:before { background-color: rgba(5, 123, 5, .3); }
input#graph-green:checked ~ .graph-container .bar-inner:after { background-color: rgba(63, 122, 47, .4); }

input#graph-rainbow:checked ~ .graph-container li:nth-child(1) .bar-inner,
input#graph-rainbow:checked ~ .graph-container li:nth-child(1) .bar-inner:before { background-color: rgba(196, 109, 59, .6); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(1) .bar-inner:after { background-color: rgba(216, 143, 102, .7); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(2) .bar-inner,
input#graph-rainbow:checked ~ .graph-container li:nth-child(2) .bar-inner:before { background-color: rgba(5, 123, 5, .3); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(2) .bar-inner:after { background-color: rgba(63, 122, 47, .4); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(3) .bar-inner,
input#graph-rainbow:checked ~ .graph-container li:nth-child(3) .bar-inner:before { background-color: rgba(255, 0, 0, .3); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(3) .bar-inner:after { background-color: rgba(255, 71, 71, .3); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(4) .bar-inner,
input#graph-rainbow:checked ~ .graph-container li:nth-child(4) .bar-inner:before { background-color: rgba(255, 248, 136, .3); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(4) .bar-inner:after { background-color: rgba(252, 248, 182, .5); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(5) .bar-inner,
input#graph-rainbow:checked ~ .graph-container li:nth-child(5) .bar-inner:before { background-color: rgba(5, 62, 123, .6); }
input#graph-rainbow:checked ~ .graph-container li:nth-child(5) .bar-inner:after { background-color: rgba(47, 83, 122, .7); }


/****************
 * SIZE BUTTONS  *
 ****************/
input[name^="resize-"] {
 position: absolute;
 opacity: 0;
 cursor: pointer;
 z-index: 100;
 width: 70px;
 height: 35px;
 z-index: 100;
}
/* unselected color switch */
input[name^="resize-"] + label {
    color: #fff;
 display: inline-block;
    background: rgba(183, 172, 172, .7);
 width: 70px;
 line-height: 35px;
 height: 35px;
    text-align: center;
 position: relative;
}
input[name^="resize-"]:checked + label {
    background: rgba(34, 35, 36, .7);
    color: #fff;
 box-shadow: 0px 1px 1px rgba(255,255,255,0.3);
}

input#graph-small:checked ~ .graph-container .bar-container,
input#graph-small:checked ~ .graph-container:after,
input#graph-small:checked ~ .graph-container > li:last-child  {
    height: 10em;
}

input#graph-normal:checked ~ .graph-container .bar-container,
input#graph-normal:checked ~ .graph-container:after,
input#graph-normal:checked ~ .graph-container > li:last-child  {
    height: 30em;
}

input#graph-large:checked ~ .graph-container .bar-container,
input#graph-large:checked ~ .graph-container:after,
input#graph-large:checked ~ .graph-container > li:last-child  {
    height: 60em;
}

/******************************************************************************
 **                                                                          **
 ** VARIABLES                                                                **
 **                                                                          **
 ******************************************************************************/

/****************
 * SPACING      *
 ****************/

/* spacing between bars */
.graph-container > li .bar-container {
    margin-right: 1.5em;
}
/* spacing before first bar */
.graph-container > li:first-child {
    margin-left: 1.5em;
}
/* spacing after last bar */
.graph-container > li:nth-last-child(2) .bar-container {
    margin-right: 1em;
}

/****************
 *    Colors    *
 ****************/

/* Bar's Back side */
.bar-background {
    background-color: rgba(160, 160, 160, .1);
}
/* Bar's Bottom side */
.bar-background:before {
    background-color: rgba(160, 160, 160, .2);
}
/* Bar's Left Back side */
.bar-background:after {
    background-color: rgba(160, 160, 160, .05);
}
/* Bar's Front side */
.bar-foreground {
    background-color: rgba(160, 160, 160, .1);
}

.button-label{
 font-weight: bold;
 color: #aaa;
 line-height: 40px;
 text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
 display: inline;
 margin: 0 10px 0 20px;
}
.button-label:before {
 content: " ";
 white-space: wrap;
}

.main span:first-of-type{
 margin-left: 0px;
}
/******************************************************************************
 **                                                                          **
 ** RESPONSIVENESS                                                           **
 **                                                                          **
 ** Just as an example to show you the way how to resize the graph     **
 **                                                                          **
 ******************************************************************************/

@media screen and (max-width: 1125px) {
 .graph-container{ font-size: 0.7em; }
}
@media screen and (max-width: 1050px) {
 .graph-container{ font-size: 0.6em; }
}
@media screen and (max-width: 900px) {
 .button-label{ margin: 0 10px 0 0; }
 .button-label:before { content:"\A"; white-space: pre;  }
 .main { padding: 20px 20px 40px; }
}
@media screen and (max-width: 765px) {
 .graph-container { font-size: 0.5em; }
}
@media screen and (max-width: 720px) {
 .graph-container { font-size: 0.45em; }
}
@media screen and (max-width: 630px) {
 .graph-container { font-size: 0.32em; }
}
@media screen and (max-width: 360px) {
 .graph-container { font-size: 0.22em; }
 .button-label{ margin: 0 5px 0 0;}
}
.ie-note-1{display:block;} .main{display:none;}
Step 5: Now Save Template then
Step 6: Now Find this code </head> by pressing Ctrl + F
Step 7: Copy the code from below and Paste it  Before/above </head>

<script type="text/javascript">
   ;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))};
   </script>  
Step 8: Click the Layout and Add a Gadget then
Step 9:
Click the HTML/JavaScript then

Step 10: Copy the Below code And Paste on it

<div class="container">
<section class="main">
<span class="button-label">Size:</span>
<input type="radio" name="resize-graph" id="graph-small" /><label for="graph-small">Small</label>
<input type="radio" name="resize-graph" id="graph-normal" checked="checked" /><label for="graph-normal">Normal</label>
<input type="radio" name="resize-graph" id="graph-large" /><label for="graph-large">Large</label>  
<span class="button-label">Color:</span>
<input type="radio" name="paint-graph" id="graph-blue" checked="checked" /><label for="graph-blue">Blue</label>
<input type="radio" name="paint-graph" id="graph-green" /><label for="graph-green">Green</label>
<input type="radio" name="paint-graph" id="graph-rainbow" /><label for="graph-rainbow">Rainbow</label>
<span class="button-label">Product:</span>
<input type="radio" name="fill-graph" id="f-none" /><label for="f-none">None</label>
 <input type="radio" name="fill-graph" id="f-product1" checked="checked" /><label for="f-product1">Product 1</label>
                <input type="radio" name="fill-graph" id="f-product2" /><label for="f-product2">Product 2</label>
                <input type="radio" name="fill-graph" id="f-product3" /><label for="f-product3">Product 3</label>

                <ul class="graph-container">
                    <li>
                        <span>2008</span>
                        <div class="bar-wrapper">
                            <div class="bar-container">
                                <div class="bar-background"></div>
                                <div class="bar-inner">25</div>
                                <div class="bar-foreground"></div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span>2009</span>
                        <div class="bar-wrapper">
                            <div class="bar-container">
                                <div class="bar-background"></div>
                                <div class="bar-inner">50</div>
                                <div class="bar-foreground"></div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span>2010</span>
                        <div class="bar-wrapper">
                            <div class="bar-container">
                                <div class="bar-background"></div>
                                <div class="bar-inner">75</div>
                                <div class="bar-foreground"></div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span>2011</span>
                        <div class="bar-wrapper">
                            <div class="bar-container">
                                <div class="bar-background"></div>
                                <div class="bar-inner">100</div>
                                <div class="bar-foreground"></div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span>2012</span>
                        <div class="bar-wrapper">
                            <div class="bar-container">
                                <div class="bar-background"></div>
                                <div class="bar-inner">50</div>
                                <div class="bar-foreground"></div>
                            </div>

   </div>
 </li>
  <li>
                        <ul class="graph-marker-container">
                            <li style="bottom:25%;"><span>25%</span></li>
                            <li style="bottom:50%;"><span>50%</span></li>
                            <li style="bottom:75%;"><span>75%</span></li>
                            <li style="bottom:100%;"><span>100%</span></li>
          </ul>
      </li>
 </ul>
 </section>
</div> 
 
Step 11: Save it and It will works.
 
Animated Bar Chart
48.9 KB
Animated Bar Chart
View a Sample
  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment

Item Reviewed: Animated Bar Chart with CSS3 Description: Rating: 5 Reviewed By: Unknown
Scroll to Top