Skip to content

Commit 8e54b83

Browse files
committed
update readme
1 parent dd16a16 commit 8e54b83

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

README.md

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,59 @@
1-
CSS-Spinner
2-
================
1+
# CSS-Spinner
32

43
[Live Demo](https://loading.io/css/)
54

6-
A collection of small, elegant pure css spinners for website ajax and loading animation. All required HTML and CSS are in a single file for every single spinner, and there is no external dependency. To see what's inside, check out [the live demo on loading.io](https://loading.io/css/)
5+
12 small, elegant pure css spinners collection for website ajax and loading animation.
76

8-
Average size of css-spinner is 1.5KB after minimized and 0.3KB after zipped.
97

8+
## Features
109

11-
Usage
12-
----------------
10+
* vanilla - no external dependency and no additional library required.
11+
* standalone - use any of them separately.
12+
* customizable - use Stylus variables to quickly customize them to fit your need.
13+
* easy to use - simple as copy and paste while also simple to use with pug mixins.
14+
* small - average size 1K per spinner unminimized, unzipped
15+
16+
## Usage
17+
18+
[loading.io](https://loading.io/css/) provides a web interface to quickly choose and copy your desired spinners, yet you can still find the source code in this repository. The simplest usage is as:
19+
20+
1. Find and download the html file of desired loader under build/ folder.
21+
2. Copy its content to the place you want to use this loader.
22+
3. Done.
23+
24+
Separated CSS and HTML files are also available under build folder so that you can reuse the css to reduce payload size.
25+
26+
We also provide stylus and pug source files for better integrating these spinners into your project. Find corresponding stylus and pug files for your desired spinners under src/ folders.
27+
28+
Additionally, you will need vars.styl and basic.styl if you are going to build by yourself. See following section for more detail.
29+
30+
31+
## Customization
32+
33+
To customize speed and color of a loader, first ensure you have stylus install locally ( you will need npm too ):
1334

14-
1. Download the html file of desired loader
15-
2. copy content to your desired location for this loader.
16-
3. Done!
35+
npm install -g stylus
1736

18-
Additionally, you can move the css inside the `<style>` into a standalone css file to reuse it.
37+
38+
then, edit vars.styl with your desired configuration. for now you can edit the following style of a spinner:
39+
40+
* size
41+
* color
42+
* speed
43+
44+
45+
once you've done with the editing, run stylus to build yourself a css file:
46+
47+
stylus -o . --import vars.styl --import basic.styl src/<desired-loader>/main.styl
48+
49+
50+
use the generated main.css together with build/<desired-loader>/main.html to add this loader in your project.
1951

2052

2153
Browser Compatibility
2254
----------------
2355

24-
css-spinner uses moden CSS3 technologies like CSS Animations, CSS Transformation, which are supported by all modern browsers. To support older browsers like IE9, please use [loading.io](https://loading.io/animation/icon/) to generate alternative GIF Loaders instead.
56+
These spinners use CSS Animation and Transformation which is wildly supported by major modern browsers except IE<=9. To support older browsers like IE9, please use [loading.io](https://loading.io/animation/icon/) to generate alternative GIF Loaders instead.
2557

2658

2759

@@ -31,11 +63,8 @@ License
3163
All loader files here are released under CC0 License. However, you could attribute to this link: [loading.io css spinner ( https://loading.io/css/ )](https://loading.io/css/) to give loading.io a thumbs-up.
3264

3365

34-
3566
Other Resources
3667
----------------
3768

3869
If you want to make custom css loading animation, loading.io also provides [loading.css](https://loading.io/animation/) - A pure CSS loading animation library, and a [helper GIF builder](https://loading.io/animation/icon/). Don't forget to check it out and share your customized loader with us!
3970

40-
41-

0 commit comments

Comments
 (0)