blog image
Simple CSS3 Animations: A Preloader in 15 Minutes

Animations are a huge part of many modern websites. They help present information, enliven websites, and keep users’ attention. The most common use cases for animations in client-side development are:

1. representing data loading (preloaders);
2. taking users through step-by-step operations (multi-step registration forms);
3. reacting to user interactions;
4. animating control elements (hover, click);
5. grabbing the user’s attention (pop-ups);
6. improving data visualization (landing pages, marketing campaigns).

The most common use case, however, is showing that data is loading. Depending on the website, it can take between several milliseconds and several seconds to load. Preloaders are used to entertain users while a website loads. Preloaders can be implemented both as animated GIF images and as progress bars. Regardless of how the preloader looks, its task is always the same — to inform users that the page is loading and then disappear right after the page has fully loaded.

Sed ut perspiciatis unde omnis iste natus error sit voluptatem eaque ipsa quae ab illo inventore incididunt ut labore et dolore magna consectetur adipisicing elit. Fuga, impedit.

- Amand Sayfried CEO, Kenvato Market

blog-img
blog-img

CSS transitions:

The basic idea behind CSS transitions is to smoothly change CSS properties over a set period of time. This way, you can make smooth background transitions, change margins, and so on. Transitions are great for implementing hover effects and making elements appear on the screen. To control CSS transitions, you’ll need the following properties:
1. Transition-property — sets up a list of properties that will be animated (e.g. background and opacity); by setting the value to all, you’ll animate all given properties;
2. Transition-duration — sets the duration for the animation (in seconds or milliseconds);
3. Transition-timing-function — defines the distribution of the animation throughout time (e.g. whether the animation will start slow and speed up gradually or the other way round); the full list of property values can be found here;
4. Transition-delay — defines the time delay before the animation (in seconds or milliseconds).
5. Properties should be listed in the following order: property, duration, timing-function, and delay. For instance, this code
transition: background 0.5s linear 0.3s;

3 Comments

  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.

    • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.

Leave A Comment

Your email address will not be published. Required fields are marked.