├── LICENSE ├── README.markdown ├── css3-progress-bar-ie.css ├── css3-progress-bar.css └── example.html /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Josh Sullivan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # CSS3 Progress Bars 2 | I made CSS3 progress bars for a display of data inside localized leaderboards for the new platform at G5. 3 | 4 | They are light-weight, requiring no javascript. They work on iOS devices, they're incredibly simple to customize, and using them on your site is as easy as linking to the css file and pasting in the markup. No images are used. 5 | 6 | ## Instructions 7 | 1. Include the progress bar stylesheet: 8 | 9 | 10 | 11 | 2. If you need to fully support versions of Internet Explorer prior to 9, include the IE supplemental styles after the above line. Keep in mind that the progress bars will still render well in IE6/7/8 without these styles. These styles use proprietary IE style techniques that are known to not be performant. To keep your site rendering quickly and responding well, consider not including this line and gracefully degrading in older browsers. 12 | 13 | 16 | 17 | 3. Paste the following syntax where you want a progress bar. The progress far will fill the width of its containing block element. 18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 | 4. Change the progress bar's fill level with a percentage: 26 | 27 |
28 | 29 | See example.html for more styles and colors. 30 | -------------------------------------------------------------------------------- /css3-progress-bar-ie.css: -------------------------------------------------------------------------------- 1 | /* CSS3 Progress bars by Josh Sullivan 2 | @jsullivandigs on Twitter 3 | josh@dipperstove.com */ 4 | 5 | .progress {filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e5e5e5',GradientType=0 );} 6 | 7 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 8 | COLORS 9 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 10 | 11 | .green {filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#AAFF00', endColorstr='#8c0',GradientType=0 );} 12 | .orange {filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFAA00', endColorstr='#dd9300',GradientType=0 );} 13 | .pink {filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FF00AA', endColorstr='#dd0093',GradientType=0 );} 14 | .purple {filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#AA00FF', endColorstr='#9300dd',GradientType=0 );} 15 | .blue {filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00AAFF', endColorstr='#0093dd',GradientType=0 );} 16 | -------------------------------------------------------------------------------- /css3-progress-bar.css: -------------------------------------------------------------------------------- 1 | /* CSS3 Progress bars by Josh Sullivan 2 | @jsullivandigs on Twitter 3 | josh@dipperstove.com */ 4 | 5 | .bar_mortice { 6 | height: 20px; 7 | background: #777; 8 | -moz-box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #d0d0d0, 0px 1px 1px 0px #f0f0f0; 9 | box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #d0d0d0, 0px 1px 0px 0px #f0f0f0; 10 | border: 5px solid #a0a0a0; 11 | } 12 | 13 | .progress { 14 | height: 19px; 15 | background: #FFF; 16 | float: left; 17 | background: -moz-linear-gradient(top, #fff 0%, #e5e5e5 100%); 18 | background: -webkit-linear-gradient(top, #fff 0%,#e5e5e5 100%); 19 | background: -o-linear-gradient(top, #fff 0%,#e5e5e5 100%); 20 | background: -ms-linear-gradient(top, #fff 0%,#e5e5e5 100%); 21 | background: linear-gradient(top, #fff 0%,#e5e5e5 100%); 22 | border-top: 1px solid #fff; 23 | border-bottom: 1px solid #999; 24 | } 25 | 26 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 27 | TINY 28 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 29 | 30 | .mortice_tiny { 31 | height: 7px; 32 | background: #777; 33 | -moz-box-shadow: inset 0px 1px 2px 0px #333; 34 | box-shadow: inset 0px 1px 2px 0px #333; 35 | border-width: 3px; 36 | } 37 | 38 | .progress_tiny { 39 | height: 6px; 40 | border-bottom: none; 41 | } 42 | 43 | 44 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 45 | STYLES 46 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 47 | 48 | .rounded { 49 | -moz-border-radius: 10px; 50 | border-radius: 10px; 51 | } 52 | .rounded .rounded { 53 | -moz-border-radius: 6px; 54 | border-radius: 6px; 55 | } 56 | 57 | .rounded_tiny { 58 | -moz-border-radius: 5px; 59 | border-radius: 5px; 60 | } 61 | .rounded_tiny .rounded_tiny { 62 | -moz-border-radius: 2px; 63 | border-radius: 2px; 64 | } 65 | 66 | 67 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 68 | COLORS 69 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 70 | 71 | /* GREEN */ 72 | 73 | .green { 74 | background: #af0; 75 | background: -moz-linear-gradient(top, #af0 0%, #8c0 100%); 76 | background: -webkit-linear-gradient(top, #af0 0%,#8c0 100%); 77 | background: -o-linear-gradient(top, #af0 0%,#8c0 100%); 78 | background: -ms-linear-gradient(top, #af0 0%,#8c0 100%); 79 | background: linear-gradient(top, #af0 0%,#8c0 100%); 80 | border-top-color: #e8ffbb; 81 | border-bottom-color: #690; 82 | } 83 | .green_mortice { 84 | background: #460; 85 | border-color: #690; 86 | -moz-box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #8c0, 0px 1px 1px 0px #f0f0f0; 87 | box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #8c0, 0px 1px 0px 0px #f0f0f0; 88 | } 89 | 90 | 91 | /* ORANGE */ 92 | 93 | .orange { 94 | background: #fa0; 95 | background: -moz-linear-gradient(top, #fa0 0%, #dd9300 100%); 96 | background: -webkit-linear-gradient(top, #fa0 0%,#dd9300 100%); 97 | background: -o-linear-gradient(top, #fa0 0%,#dd9300 100%); 98 | background: -ms-linear-gradient(top, #fa0 0%,#dd9300 100%); 99 | background: linear-gradient(top, #fa0 0%,#dd9300 100%); 100 | border-top-color: #ffd277; 101 | border-bottom-color: #960; 102 | } 103 | .orange_mortice { 104 | background: #640; 105 | border-color: #960; 106 | -moz-box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #c80, 0px 1px 1px 0px #f0f0f0; 107 | box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #c80, 0px 1px 0px 0px #f0f0f0; 108 | } 109 | 110 | 111 | /* PINK */ 112 | 113 | .pink { 114 | background: #f0a; 115 | background: -moz-linear-gradient(top, #f0a 0%, #dd0093 100%); 116 | background: -webkit-linear-gradient(top, #f0a 0%,#dd0093 100%); 117 | background: -o-linear-gradient(top, #f0a 0%,#dd0093 100%); 118 | background: -ms-linear-gradient(top, #f0a 0%,#dd0093 100%); 119 | background: linear-gradient(top, #f0a 0%,#dd0093 100%); 120 | border-top-color: #f6c; 121 | border-bottom-color: #906; 122 | } 123 | .pink_mortice { 124 | background: #604; 125 | border-color: #906; 126 | -moz-box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #c08, 0px 1px 1px 0px #f0f0f0; 127 | box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #c08, 0px 1px 0px 0px #f0f0f0; 128 | } 129 | 130 | 131 | /* PURPLE */ 132 | 133 | .purple { 134 | background: #a0f; 135 | background: -moz-linear-gradient(top, #A0F 0%, #9300dd 100%); 136 | background: -webkit-linear-gradient(top, #A0F 0%,#9300dd 100%); 137 | background: -o-linear-gradient(top, #A0F 0%,#9300dd 100%); 138 | background: -ms-linear-gradient(top, #A0F 0%,#9300dd 100%); 139 | background: linear-gradient(top, #A0F 0%,#9300dd 100%); 140 | border-top-color: #c655ff; 141 | border-bottom-color: #5b0088; 142 | } 143 | .purple_mortice { 144 | background: #406; 145 | border-color: #609; 146 | -moz-box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #80c, 0px 1px 1px 0px #f0f0f0; 147 | box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #80c, 0px 1px 0px 0px #f0f0f0; 148 | } 149 | 150 | 151 | /* BLUE */ 152 | 153 | .blue { 154 | background: #0af; 155 | background: -moz-linear-gradient(top, #0af 0%, #0093dd 100%); 156 | background: -webkit-linear-gradient(top, #0af 0%,#0093dd 100%); 157 | background: -o-linear-gradient(top, #0af 0%,#0093dd 100%); 158 | background: -ms-linear-gradient(top, #0af 0%,#0093dd 100%); 159 | background: linear-gradient(top, #0af 0%,#0093dd 100%); 160 | border-top-color: #88d7ff; 161 | border-bottom-color: #069; 162 | } 163 | .blue_mortice { 164 | background: #046; 165 | border-color: #069; 166 | -moz-box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #08c, 0px 1px 1px 0px #f0f0f0; 167 | box-shadow: inset 0px 1px 2px 0px #333, inset 0px -1px 1px 0px #08c, 0px 1px 0px 0px #f0f0f0; 168 | } 169 | -------------------------------------------------------------------------------- /example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | CSS3 Progress bars 9 | 10 | 13 | 30 | 31 | 32 |

CSS3 Progress bars

33 |

Default

34 |
35 |
36 |
37 |

Round

38 |

39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |

Combo

57 |
58 |
59 |
60 |
61 |
62 |
63 |

Tiny

64 |
65 |
66 |
67 |

Tiny Round

68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |

Tiny Combo

87 |
88 |
89 |
90 |
91 |
92 |
93 | 94 | 95 | --------------------------------------------------------------------------------