CSS animations

Css presentation

Source: Online program

There are many programs for editing, creating montages, or even creating animations , and more and more software is being added to this type of interactive project. In this post, we're not only going to introduce you to the world of animations, but we're also going to introduce you to a new friend.

As you well know, the world of computing is full of commands and useful tools for the development of web pages or online media, which currently coexist. Stay with us and discover in this new tutorial another way to increase your level with computing and interactivity.

What are animations?

The world of animations

Source: All gamers

We want you to fully immerse yourself in the tutorial, but to do so, it is necessary to introduce yourself to the world of animations, or what in graphic design is referred to as the world of interactive design.

Animations are also part of the audiovisual world, in fact they would be nothing if or because in them, an audio and a moving image are introduced. For this reason, when we speak of "animation", we refer to what is popularly known as "cartoons."

As summarized above, animation arises from the ability to give movement to something, in this case, cartoons. But how are all these movements achieved? Undoubtedly, they arise from what we call sequences of drawings or photographs which, when arranged consecutively, one after the other, manage to generate a believable movement before our eyes, which readily accept and participate in the game of visual illusion.

Formerly, the first animations were designed on sheets of paper, in each of them, the animated character was drawn taking steps, and once the end of the sheet was reached, it was passed one by one quickly to achieve the effect of movement in the drawing.

Animation types

There are different types of animation:

Cartoon or Traditional Animation

This style consists of giving movement to the protagonist frame by frame. At the beginning, when there were not enough audiovisual means, they were carried out through the drawing and painting of each frame (including the background, stage or background of the animation), to later be filmed on what we know as a film tape.

Stop Motion

Stop Motion is an animation technique that has nothing to do with cartoons. Furthermore, its main objective is to simulate the movements of objects that in reality are totally static and it is divided into two phases: animation of clay or claymotion and animation of rigid objects.

Pixelation

Pixelation is a technique that comes from Stop Motion and consists of working with objects that are neither dolls nor models, but common objects or people. Objects are photographed multiple times and shift slightly with each frame.

Rotoscopy

It consists of the direct drawing of another drawing, such as the tracing of a drawing on another drawing or of a real person. It is considered a precursor to mocap, that is, to motion capture that is used to recreate digital characters in the world of cinema.

Animation by Cutouts or Cut out Animation

It is a technique that consists of cutting figures, these figures can be represented on paper or in photographs. The body of the characters is built based on cutouts and movement and animation arise from a replacement of said cutouts.

3D Animation

3D animation originates from an editor program, which allows simulations and animations to be carried out. Within these two variants, good lighting, camera movements and special effects come into contact.

Currently there are also other techniques such as: painting on glass, sand animation, needle screen and painting on celluloid.

What is CSS?

Css interface of a program

Source: Rosario Session Studio Web Design

Now that you know a little more about the world of animations, it's time for us to introduce you to the world of CSS acronyms.

The acronym CSS stands for "Cascading Style Sheets." It's a language used in web design and presentation. To put it simply, it's a set of tools and commands that ensure a web page looks exactly as we see it for the first time after it's been created. It works in conjunction with HTML ( which organizes the basic content of the pages).

Its name is determined by the number of leaves it contains and one of them inherits properties or characteristics from others. That is, you can work with a simple blog template, but when you want to customize the appearance of a site you will need to implement CSS that together with a good CMS will help you enhance the reach of your content.

What is CSS for?

With CSS, you can organize your page; that is, you can tell your website how to arrange all the information so that it's easy and useful for the viewer. This includes all the commands for elements that are part of the website's style or design, such as fonts, colors, sizes, and so on.

Normally, so that you better understand what this tool is about, digital marketing specialists are the first to understand about this since they are the ones who handle them.

Animate in CSS

Well, now that you know a little about the world of animations and CSS. It's time to start the tutorial.

CSS animations allow you to animate the transition between one CSS style and another. These animations consist of two components: a style that describes the CSS animation and a set of frames that indicate its initial and final states, as well as any intermediate points.

Each of these animations has a series of advantages:

  • Its use is very easy for simple animations, you can do it even without having knowledge of Javascript.
  • Animation displays correctly, even on low-power computers.
  • Being controlled by a browser, it allows optimizing its performance and efficiency, thus reducing the frequency and executing the tabs in such a way that they are not visible.

Animation settings

To begin an animation, we first need to configure it. To do this, we'll go to the animation property and its sub-properties. This tool will allow us to configure both the pace and duration of the animation, and even its sequence.

The sub - properties are:

animation - delay

Delay time between the moment the element is loaded and the beginning of the animation sequence.

animation - direction

Indicates whether the animation should go back to the start frame at the end of the sequence or whether it should start from the beginning when it reaches the end.

animation - duration

Indicates the amount of time the animation takes to complete its cycle (the duration)

animation - iteration - count

The number of times it repeats. We can specify infinite to repeat the animation indefinitely.

animation - name

It is used to specify the name that describes each of the frames of the animation.

animation - play - state

Allows you to be able to pause and resume the animation sequence.

animation - timing- function

It indicates the rhythm of the animation, that is, how the animation frames are shown, for this, acceleration curves are established.

animation - fill - mode

Specifies what values ​​the properties will have after the animation ends.

Set up the sequence with frames

Once we have configured the time, the nomenclature etc. It is time to offer a look or feel to our animation.

To do this, we'll set up two new frames and use the @keyframes rule . This way, each frame describes the position of each element during the animation sequence.

To indicate time and rhythm , the frame uses percentage and with from and to , thanks to this, we can indicate when the beginning takes place with 0% and the end with 100%.

Frame and text animation

To add more frames and animate them with text, you need to apply a larger size of the header font so that the header increases as it moves for a set amount of time, and then decreases to its original size afterwards. For this we are going to establish the following code:

75% font - size: 300%; margn - left: 25%; width: 150%;

With this code, we suggest to the browser that in 75% of the sequence, the header has a left margin of 25% and a size of 200% with a width of 150%.

Animation repeat

To make an animation repeat, you need to use the `animation – iteration – count` property and specify how many times you want it to repeat. You can also use `infinite` to make it repeat indefinitely.

Conclusion

As you have seen, in CSS you can create animated projects and you can enter it by following the steps we have given you. If you continue to inquire and inform yourself, you will discover that there are many options available to us.

Have you dared already?


Add as preferred source in Google