Table of Contents
Class names corresponding to various special effects in wow.js
Home Web Front-end JS Tutorial Detailed explanation of class names corresponding to various special effects in wow.js

Detailed explanation of class names corresponding to various special effects in wow.js

Oct 24, 2017 am 09:51 AM
javascript Class name

Class names corresponding to various special effects in wow.js

1. (When the page scrolls down, some elements will produce small animation effects. Although the animation is relatively small, it can attract you Attention.)

I just learned about the wow.js plug-in. I used to see various effects when I visited other websites and pulled down the scroll bar. Now I can get this effect by myself.

Although the effect has come out, the class names corresponding to various special effects have not been sorted out on the Internet, so I wrote an easy-to-understand (at least I can understand it) article for everyone's reference and study. (^_^)

2. First explain how to use this plug-in:

1. wow.js depends on animate.css, first reference animate.css or animate.min in the head .css.

<link rel="stylesheet" type="text/css" href="css/animate.min.css">
Copy after login

 2. Quote wow.js or wow.min.js at the bottom, and then write another line of javascript code below. (No need to quote jQuery)

<script type="text/javascript" src="js/wow.min.js"></script>
<script type="text/javascript">
    new WOW().init();
</script>
Copy after login

 Note that WOW in new WOW().init(); must be capitalized, otherwise it will have no effect.
2. Quote wow.js or wow.min.js at the bottom, and then write another line of javascript code below. (No need to quote jQuery)

3. Write the elements that need animation below the css and above the js (must be set to block or inline block! Must be set to block or inline block! Must be set to block or inline block Inline block! ) and add the class name.

<p class="wow slideInLeft" data-wow-duration="2s" data-wow-delay="5s" data-wow-offset="10"  data-wow-iteration="10"></p>
Copy after login

The wow in front of the class name is added to every animated element, and slideInLeft describes the animation style. The following

data-wow-duration (animation duration),

data-wow-delay (animation delay time),

data-wow-offset (element’s How many pixels away from the bottom after the position is exposed)

data-wow-iteration (number of animation execution times)

These four attributes are optional.

4. In order to write an article, I specifically tested the two attributes data-wow-offset and data-wow-iteration. The value in data-wow-offset="value" is completed by animation. The position of the back element from the bottom of the monitor, not the bottom of the browser window.

3. Getting to the point, let’s test the animation effects of various class names in turn. (Strive to make it easy to understand)

wow rollInScroll from left to right, clockwise, transparency changes from 100% to the set value


wow bounceIn Appears from the original position, changes from small to large beyond the set value, and then becomes smaller than Set value, then return to the set value, the transparency changes from 100% to the set value
wow bounceInUpFrom bottom to top, it will exceed upward after jumping up A part then bounces back, the transparency remains unchanged at the set value
wow bounceInDownFrom top to bottom, after falling, it will go down a part and then bounce a bit, transparency The set value remains unchanged
wow bounceInLeftFrom left to right, after moving over, it will extend a part to the right and then bounce to the left. The transparency is the set value. Unchanged
wow bounceInRightFrom right to left, after moving over, it will extend a part to the left and then bounce to the right, the transparency will remain unchanged at the set value


wow slideInUpFrom bottom to top, come up and fix To the set position, the transparency remains at the set value (up means from bottom to top) (if the element is at the bottom, it will expand the height of the box)
wow slideInDown From top to bottom, after coming up, it will be fixed to the set position, and the transparency will remain unchanged at the set value
wow slideInLeftFrom left to right, after coming up Fixed to the set position, the transparency remains at the set value (left is from left to right)
wow slideInRightFrom right to left, fixed after coming up To the set position, the transparency remains unchanged at the set value


wow lightSpeedIn从右往左、头部先向右倾斜,又向左倾斜,最后变为原来的形状、透明度从100%变化至设定值
wow pulse原位置放大一点点在缩小至原本大小、透明度为设定值不变(配合动画执行次数属性效果更佳)
wow flipInX原位置后仰前栽、透明度从100%变化至设定值
wow flipInY原位置左右旋动、透明度从100%变化至设定值
wow bounce上下抖动、透明度为设定值不变(配合动画执行次数和动画持续时间属性可以实现剧烈抖动亦或是慢慢抖)
wow shake左右抖动、透明度为设定值不变(配合动画执行次数和动画持续时间属性可以实现剧烈抖动亦或是慢慢抖)
wow swing从右往左、头部先向右倾斜,又向左倾斜,最后变为原来的形状、透明度为设定值不变
wow bounceInU原位置不变、直接从不显示到显示(无过过渡效果)
wow wobble原位置不变、类似于一个人站在那左右晃头、透明度为设定值不变

   测试了这么多终于摸到窍门了,打开引用的animate.css或者animate.min.css,里面@keyframes定义了各种动画,将wow后面的类名替换一下测试效果就可以了。

****************************************************************
            https://daneden.github.io/animate.css/          也可以在这个地方看各种演示
****************************************************************
Copy after login

四、配合data-wow-duration(动画持续时间)、data-wow-delay(动画延迟时间)、data-wow-offset(元素的位置露出后距离底部多少像素执行)和data-wow-iteration(动画执行次数)这四个属性可以完成很多效果,主要还是多实践。

五、IE6、IE7 等老旧浏览器不支持 CSS3 动画,所以没有效果;而 wow.js 也使用了 querySelectorAll 方法,IE 低版本会报错。为了达到更好的兼容,最好加一个浏览器及版本判断。

The above is the detailed content of Detailed explanation of class names corresponding to various special effects in wow.js. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to implement an online speech recognition system using WebSocket and JavaScript How to implement an online speech recognition system using WebSocket and JavaScript Dec 17, 2023 pm 02:54 PM

How to use WebSocket and JavaScript to implement an online speech recognition system Introduction: With the continuous development of technology, speech recognition technology has become an important part of the field of artificial intelligence. The online speech recognition system based on WebSocket and JavaScript has the characteristics of low latency, real-time and cross-platform, and has become a widely used solution. This article will introduce how to use WebSocket and JavaScript to implement an online speech recognition system.

WebSocket and JavaScript: key technologies for implementing real-time monitoring systems WebSocket and JavaScript: key technologies for implementing real-time monitoring systems Dec 17, 2023 pm 05:30 PM

WebSocket and JavaScript: Key technologies for realizing real-time monitoring systems Introduction: With the rapid development of Internet technology, real-time monitoring systems have been widely used in various fields. One of the key technologies to achieve real-time monitoring is the combination of WebSocket and JavaScript. This article will introduce the application of WebSocket and JavaScript in real-time monitoring systems, give code examples, and explain their implementation principles in detail. 1. WebSocket technology

How to implement an online reservation system using WebSocket and JavaScript How to implement an online reservation system using WebSocket and JavaScript Dec 17, 2023 am 09:39 AM

How to use WebSocket and JavaScript to implement an online reservation system. In today's digital era, more and more businesses and services need to provide online reservation functions. It is crucial to implement an efficient and real-time online reservation system. This article will introduce how to use WebSocket and JavaScript to implement an online reservation system, and provide specific code examples. 1. What is WebSocket? WebSocket is a full-duplex method on a single TCP connection.

How to use JavaScript and WebSocket to implement a real-time online ordering system How to use JavaScript and WebSocket to implement a real-time online ordering system Dec 17, 2023 pm 12:09 PM

Introduction to how to use JavaScript and WebSocket to implement a real-time online ordering system: With the popularity of the Internet and the advancement of technology, more and more restaurants have begun to provide online ordering services. In order to implement a real-time online ordering system, we can use JavaScript and WebSocket technology. WebSocket is a full-duplex communication protocol based on the TCP protocol, which can realize real-time two-way communication between the client and the server. In the real-time online ordering system, when the user selects dishes and places an order

JavaScript and WebSocket: Building an efficient real-time weather forecasting system JavaScript and WebSocket: Building an efficient real-time weather forecasting system Dec 17, 2023 pm 05:13 PM

JavaScript and WebSocket: Building an efficient real-time weather forecast system Introduction: Today, the accuracy of weather forecasts is of great significance to daily life and decision-making. As technology develops, we can provide more accurate and reliable weather forecasts by obtaining weather data in real time. In this article, we will learn how to use JavaScript and WebSocket technology to build an efficient real-time weather forecast system. This article will demonstrate the implementation process through specific code examples. We

Simple JavaScript Tutorial: How to Get HTTP Status Code Simple JavaScript Tutorial: How to Get HTTP Status Code Jan 05, 2024 pm 06:08 PM

JavaScript tutorial: How to get HTTP status code, specific code examples are required. Preface: In web development, data interaction with the server is often involved. When communicating with the server, we often need to obtain the returned HTTP status code to determine whether the operation is successful, and perform corresponding processing based on different status codes. This article will teach you how to use JavaScript to obtain HTTP status codes and provide some practical code examples. Using XMLHttpRequest

How to use insertBefore in javascript How to use insertBefore in javascript Nov 24, 2023 am 11:56 AM

Usage: In JavaScript, the insertBefore() method is used to insert a new node in the DOM tree. This method requires two parameters: the new node to be inserted and the reference node (that is, the node where the new node will be inserted).

How to get HTTP status code in JavaScript the easy way How to get HTTP status code in JavaScript the easy way Jan 05, 2024 pm 01:37 PM

Introduction to the method of obtaining HTTP status code in JavaScript: In front-end development, we often need to deal with the interaction with the back-end interface, and HTTP status code is a very important part of it. Understanding and obtaining HTTP status codes helps us better handle the data returned by the interface. This article will introduce how to use JavaScript to obtain HTTP status codes and provide specific code examples. 1. What is HTTP status code? HTTP status code means that when the browser initiates a request to the server, the service

See all articles