2017-06-11 04:31:28 +08:00
# CSS Progress Pie
This is a progress pie done in CSS. It came about when I needed a simple progress pie but didn't want to rely on any JS plugins as they took too long to load for a specific situation at work. I also felt that my CTO was going to strangle me if I introduce another JS plugin, especially one just for aethestic purposes :sweat_smile:.
## Examples
2017-06-11 16:01:14 +08:00
< a href = "https://oliviale.github.io/CSS-Progress-Pie" target = "_blank" > See here for examples and use cases< / a > .
2017-06-11 15:54:17 +08:00
2017-06-11 04:33:52 +08:00
![CSS Progress Pie examples ](images/example.png )
2017-06-11 04:31:28 +08:00
## How To Use
2017-06-11 15:54:17 +08:00
1. Download the CSS or SCSS file and include it in your `<head>` .
There are two kinds - default (single color) or colored with red, yellow and green for the numbers 1 to 40, 41 to 70 and 71 to 100 respectively.
2017-06-11 04:31:28 +08:00
``` html
2017-06-11 04:36:19 +08:00
< link rel = "stylesheet" href = "css/progress_pie_compiled.css" / >
2017-06-11 04:31:28 +08:00
```
2017-06-11 15:54:17 +08:00
2. HTML structure with `data-value` being a number from 1 to 100.
2017-06-11 04:31:28 +08:00
``` html
< div class = "progress-pie" data-value = "50" > < / div >
2017-06-11 15:54:17 +08:00
< div class = "progress-pie-color" data-value = "80" > < / div >
2017-06-11 04:31:28 +08:00
```
3. Uh... that's it.
2017-06-11 15:54:17 +08:00
2017-06-11 04:31:28 +08:00
## Changing colors, fonts, etc.
2017-06-11 16:01:14 +08:00
Manually change the properties of the CSS code. < a href = "https://oliviale.github.io/CSS-Progress-Pie #styling " target = "_blank" > More details here</ a > .
2017-06-11 04:31:28 +08:00
2017-06-11 04:36:19 +08:00
## Playground
2017-06-11 04:31:28 +08:00
[Play around in this Codepen ](https://codepen.io/oliviale/pen/YqEgPw )
2017-06-11 04:36:19 +08:00
## License and other stuff
2017-06-11 04:31:28 +08:00
Do whatever you want license, but preferably do not delete the author comments in the CSS file :joy:.
2017-06-11 04:36:19 +08:00
2017-06-11 04:31:28 +08:00
Also, if you do end up using this and do wonderful things like you wonderful people always do, forking or tweeting your work at [me ](http://twitter.com/meowlivia_ ) is appreciated.