Giter VIP home page Giter VIP logo

-cs-spinner's Introduction

#(cs)spinner

###Pure CSS loading animations with minimal effort!

alt tag

Demo

here.

Usage

  1. Include the stylesheet(tweaking where necessary).
  2. Add and remove appropriate classes to your elements when necessary to show loading(using js).

That's it!

	<div class="csspinner duo">
		This content is taking ages to load.
	</div>

####options From using the demo you can work out which classes you need to add to your elements in order to show the loading animation you want.

By default, you will always need csspinner.

Then there are;

  • traditional
  • duo
  • double-up
  • sphere
  • sphere-vertical
  • bar
  • bar-follow
  • line
  • line grow
  • line back-and-fourth
  • shadow
  • shadow oval/shadow oval left
  • shadow oval right

There is also no-overlay which will hide the overlay which is added by default.

Tweaking/Developing

I am fully aware that my styling of these animations aren't to everyones tastes and also that sometimes positioning won't be suitable etc. therefore it is likely you'll have to tweak the stylesheet to get the colors you want etc.

I've provided both LESS and SASS/SCSS versions of the file and have provided variables that can be easily changed where I think makes sense in this first run of creating (cs)spinner. Of course, feel free to submit an issue or send me a message if you feel something could be much better.

How does this work?

Not surprisingly it's real simple! :)

(cs)spinner makes use of CSS pseudo elements. It uses :before to provide an overlay effect if required and :after to show the animated spinner/bar etc.

making use of pseudo elements means that we can add (cs)spinner loading animations to any existing element on our page without being intrusive just by adding some classes as long as the elements pseudo elements aren't currently in use.

Contributing

Any suggestions, improvements or issues are welcome. :)

@jh3y

License

MIT

Copyright (c) 2014 @jh3y

-cs-spinner's People

Contributors

jh3y avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.