<!DOCTYPE html>
<head>
<title>Animated Bar</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<style type="text/css">
* {
font-family:source-sans-pro;
font-size: 16px;
color:#282828;
}
.wrapper {
position:relative;
width:80%;
margin:20px auto;
}
/* Defining the animation */
@-webkit-keyframes progress
{
to {background-position: 30px 0;}
}
@-moz-keyframes progress
{
to {background-position: 30px 0;}
}
@keyframes progress
{
to {background-position: 30px 0;}
}
/* Set the base of our loader */
.barBg {
background:#282828;
width:100%;
height:15px;
border:10px solid #282828;
border-radius: 20px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
box-shadow: 0px 5px 17px rgba(40, 40, 40, 0.5);
margin-bottom:30px;
}
.bar {
background: #7aff32;
height:30px;
height: 15px;
border-radius: 12px;
-moz-border-radius: 12px;
-webkit-border-radius: 10px;
}
/* Set the linear gradient tile for the animation and the playback */
.barFill {
width: 100%;
height: 15px;
border-radius: 20px;
-webkit-animation: progress 1s linear infinite;
-moz-animation: progress 1s linear infinite;
animation: progress 1s linear infinite;
background-repeat: repeat-x;
background-size: 30px 30px;
background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
/* Here's some predefined widths to control the fill. Add these classes to the "bar" div */
.ten {
width: 10%; /* Sets the progress to 10% */
}
.twenty {
width: 20%; /* Sets the progress to 20% */
}
.thirty {
width: 30%; /* Sets the progress to 30% */
}
.forty {
width: 40%; /* Sets the progress to 40% */
}
.fifty {
width: 50%; /* Sets the progress to 50% */
}
.sixty {
width: 60%; /* Sets the progress to 60% */
}
.seventy {
width: 70%; /* Sets the progress to 70% */
}
.eighty {
width: 80%; /* Sets the progress to 80% */
}
.ninety {
width: 90%; /* Sets the progress to 90% */
}
.hundred {
width: 100%; /* Sets the progress to 100% */
}
/* Some colour classes to get you started. Add the colour class to the "bar" div */
.aquaGradient{
background: -moz-linear-gradient(top, #7aff32 0%, #54a6e5 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7aff32), color-stop(100%,#54a6e5));
background: -webkit-linear-gradient(top, #7aff32 0%,#54a6e5 100%);
background: -o-linear-gradient(top, #7aff32 0%,#54a6e5 100%);
background: -ms-linear-gradient(top, #7aff32 0%,#54a6e5 100%);
background: linear-gradient(to bottom, #7aff32 0%,#54a6e5 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7aff32', endColorstr='#54a6e5',GradientType=0 );
}
.roseGradient {
background: #ff3232;
background: -moz-linear-gradient(top, #ff3232 0%, #ed89ff 47%, #ff8989 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff3232), color-stop(47%,#ed89ff), color-stop(100%,#ff8989));
background: -webkit-linear-gradient(top, #ff3232 0%,#ed89ff 47%,#ff8989 100%);
background: -o-linear-gradient(top, #ff3232 0%,#ed89ff 47%,#ff8989 100%);
background: -ms-linear-gradient(top, #ff3232 0%,#ed89ff 47%,#ff8989 100%);
background: linear-gradient(to bottom, #ff3232 0%,#ed89ff 47%,#ff8989 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff3232', endColorstr='#ff8989',GradientType=0 );
}
.madras { /* Credit to Divya Manian via http://lea.verou.me/css3patterns/#madras */
background-color: hsl(34, 53%, 82%);
background-image: -webkit-repeating-linear-gradient(45deg, transparent 5px, hsla(197, 62%, 11%, 0.5) 5px, hsla(197, 62%, 11%, 0.5) 10px,
hsla(5, 53%, 63%, 0) 10px, hsla(5, 53%, 63%, 0) 35px, hsla(5, 53%, 63%, 0.5) 35px, hsla(5, 53%, 63%, 0.5) 40px,
hsla(197, 62%, 11%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 50px, hsla(197, 62%, 11%, 0) 50px, hsla(197, 62%, 11%, 0) 60px,
hsla(5, 53%, 63%, 0.5) 60px, hsla(5, 53%, 63%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 80px,
hsla(35, 91%, 65%, 0) 80px, hsla(35, 91%, 65%, 0) 90px, hsla(5, 53%, 63%, 0.5) 90px, hsla(5, 53%, 63%, 0.5) 110px,
hsla(5, 53%, 63%, 0) 110px, hsla(5, 53%, 63%, 0) 120px, hsla(197, 62%, 11%, 0.5) 120px, hsla(197, 62%, 11%, 0.5) 140px
),
-webkit-repeating-linear-gradient(-45deg, transparent 5px, hsla(197, 62%, 11%, 0.5) 5px, hsla(197, 62%, 11%, 0.5) 10px,
hsla(5, 53%, 63%, 0) 10px, hsla(5, 53%, 63%, 0) 35px, hsla(5, 53%, 63%, 0.5) 35px, hsla(5, 53%, 63%, 0.5) 40px,
hsla(197, 62%, 11%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 50px, hsla(197, 62%, 11%, 0) 50px, hsla(197, 62%, 11%, 0) 60px,
hsla(5, 53%, 63%, 0.5) 60px, hsla(5, 53%, 63%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 80px,
hsla(35, 91%, 65%, 0) 80px, hsla(35, 91%, 65%, 0) 90px, hsla(5, 53%, 63%, 0.5) 90px, hsla(5, 53%, 63%, 0.5) 110px,
hsla(5, 53%, 63%, 0) 110px, hsla(5, 53%, 63%, 0) 140px, hsla(197, 62%, 11%, 0.5) 140px, hsla(197, 62%, 11%, 0.5) 160px
);; background-color: hsl(34, 53%, 82%);
background-image: -webkit-repeating-linear-gradient(45deg, transparent 5px, hsla(197, 62%, 11%, 0.5) 5px, hsla(197, 62%, 11%, 0.5) 10px,
hsla(5, 53%, 63%, 0) 10px, hsla(5, 53%, 63%, 0) 35px, hsla(5, 53%, 63%, 0.5) 35px, hsla(5, 53%, 63%, 0.5) 40px,
hsla(197, 62%, 11%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 50px, hsla(197, 62%, 11%, 0) 50px, hsla(197, 62%, 11%, 0) 60px,
hsla(5, 53%, 63%, 0.5) 60px, hsla(5, 53%, 63%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 80px,
hsla(35, 91%, 65%, 0) 80px, hsla(35, 91%, 65%, 0) 90px, hsla(5, 53%, 63%, 0.5) 90px, hsla(5, 53%, 63%, 0.5) 110px,
hsla(5, 53%, 63%, 0) 110px, hsla(5, 53%, 63%, 0) 120px, hsla(197, 62%, 11%, 0.5) 120px, hsla(197, 62%, 11%, 0.5) 140px
),
-webkit-repeating-linear-gradient(-45deg, transparent 5px, hsla(197, 62%, 11%, 0.5) 5px, hsla(197, 62%, 11%, 0.5) 10px,
hsla(5, 53%, 63%, 0) 10px, hsla(5, 53%, 63%, 0) 35px, hsla(5, 53%, 63%, 0.5) 35px, hsla(5, 53%, 63%, 0.5) 40px,
hsla(197, 62%, 11%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 50px, hsla(197, 62%, 11%, 0) 50px, hsla(197, 62%, 11%, 0) 60px,
hsla(5, 53%, 63%, 0.5) 60px, hsla(5, 53%, 63%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 70px, hsla(35, 91%, 65%, 0.5) 80px,
hsla(35, 91%, 65%, 0) 80px, hsla(35, 91%, 65%, 0) 90px, hsla(5, 53%, 63%, 0.5) 90px, hsla(5, 53%, 63%, 0.5) 110px,
hsla(5, 53%, 63%, 0) 110px, hsla(5, 53%, 63%, 0) 140px, hsla(197, 62%, 11%, 0.5) 140px, hsla(197, 62%, 11%, 0.5) 160px
);
}
.cornflowerblue {
background-color: CornflowerBlue;
box-shadow:inset 0px 0px 6px 2px rgba(255,255,255,.3);
}
.carrot {
background: #f2a130;
background: -moz-linear-gradient(-45deg, #f2a130 0%, #e5bd6e 100%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f2a130), color-stop(100%,#e5bd6e));
background: -webkit-linear-gradient(-45deg, #f2a130 0%,#e5bd6e 100%);
background: -o-linear-gradient(-45deg, #f2a130 0%,#e5bd6e 100%);
background: -ms-linear-gradient(-45deg, #f2a130 0%,#e5bd6e 100%);
background: linear-gradient(135deg, #f2a130 0%,#e5bd6e 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2a130', endColorstr='#e5bd6e',GradientType=1 );
}
</style>
<body>
<div class ="wrapper">
100% Fill, Aqua Gradient
<div class ="barBg">
<div class ="bar hundred aquaGradient">
<div class ="barFill"></div>
</div>
</div>
90% Fill, Rose Gradient
<div class ="barBg">
<div class ="bar ninety roseGradient">
<div class ="barFill"></div>
</div>
</div>
70% Fill, Madras
<div class ="barBg">
<div class ="bar seventy madras">
<div class ="barFill"></div>
</div>
</div>
60% Fill, Cornflower Blue
<div class ="barBg">
<div class ="bar sixty cornflowerblue">
<div class ="barFill"></div>
</div>
</div>
40% Fill, Carrot
<div class ="barBg">
<div class ="bar forty carrot">
<div class ="barFill"></div>
</div>
</div><center>
<a href="http://www.midorinco.ir" target="_blank">منتشر شده در تالار میدوری</a></center>
</div>
</body>
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|