You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-14Lines changed: 43 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,59 @@
1
-
CSS-Spinner
2
-
================
1
+
# CSS-Spinner
3
2
4
3
[Live Demo](https://loading.io/css/)
5
4
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.
7
6
8
-
Average size of css-spinner is 1.5KB after minimized and 0.3KB after zipped.
9
7
8
+
## Features
10
9
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 ):
13
34
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
17
36
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:
use the generated main.css together with build/<desired-loader>/main.html to add this loader in your project.
19
51
20
52
21
53
Browser Compatibility
22
54
----------------
23
55
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.
25
57
26
58
27
59
@@ -31,11 +63,8 @@ License
31
63
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.
32
64
33
65
34
-
35
66
Other Resources
36
67
----------------
37
68
38
69
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!
0 commit comments