įor Zoom-out-right, the code snippet is shown below. įor Zoom-out-left, the code snippet is shown below. įor Zoom-out-down, the code snippet is shown below. įor Zoom-out-up, the code snippet is shown below. Similarly, if we want to do the zoom-out animation, we can make use of the shown in the code snippet below. įor Zoom-in-right, the code snippet is shown below. įor Zoom-in-left, the code snippet is shown below. įor Zoom-in-down, the code snippet is shown below. Similarly, if we want to do the zoom-in-up animation, we can make use of the shown in the code snippet below. When we run the above code in the browser, we should see a div with the Text Zoom in the zooming animation towards the upward direction. Let's consider the following index.html file in which we will do the "zoom-in" animation. Now let's use all of them one by one in a simple HTML-CSS example. The Zoom animation simulates the zooming behaviour and in total there are 8 different animations that can be achieved with it. įor Flip-right, the code snippet is shown below. įor Flip-left, the code snippet is shown below. Similarly, if we want to do the flipdown animation, we can make use of the shown in the code snippet below. When you run the above code in the browser, you should see a div with the text "Flip Up!" coming in the flipping animation towards the upward direction. Let's consider the following index.html file in which we will do the "flip-up" animation. Now let's use of all of them one by one in a simple HTML-CSS example. Flip Animation Using AOS.jsįlip animation simulates the flipping behaviour and in total there are 4 different animations that can be achieved with it. With this, we can conclude that Fading animations in AOS are done. įor Fade-down-right, the code snippet is shown below. įor Fade-down-left, the code snippet is shown below. įor Fade-up-right, the code snippet is shown below. įor Fade-up-left, the code snippet is shown below. įor Fade-right, the code snippet is shown below. We just need to replace the in the index.html file with the above div to get the fade-down animation.įor Fade-left, the code snippet is shown below. Similarly, if we want to do the fading-down animation, we can make use of the shown in the code snippet below. When you run the above code in the browser, you should see a div with the text "Something Up!" coming in the fading animation towards the upward direction. Now, let's consider the following index.html file in which we will do the "fade-up" animation. In the above code, we are passing the value to the data-aos property as "fade-up" and in all the fading cases, only this value will be changed. The below code snippet is the only part in which we will make changes for all the above fade animations. Now let's make use of all of them one by one in a simple HTML-CSS example. The Fade animation simulates the fading behaviour and in total, there are 8 different animations that can be achieved with it. Once we added both the above code snippets in our HTML code, we are ready to make use of AOS in our code. The above code snippet will help in getting the css file and in order to get the js file, we need to paste the CDN code snippet shown below at the end of the body tag in our HTML code. You just need to paste the below code snippet at the end of the tag in your HTML code. Before we do that, we first need to make sure that aos.css and aos.js are available to us in our code, and we can get them through the help of CDN links. The first category of animations that we will explore are the fading one's. In this tutorial, we will explore different types of animations that we can use in AOS.js with the help of different examples. While there are different animation JavaScript libraries out there, AOS.js is probably the simplest of them. AOS.js (Animation on Scroll) is an animation-providing JavaScript library that makes it easier to add tons of animations by simply changing the name of the class in the div tag in which you want to add an animation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |