我在我的项目中使用了 wow.js 和 animate.css。我添加了哇属性,例如'data-wow-delay="2s"。但是,它适用于 IE,但不适用于 Chrome 版本 68.0.3440.106。实际上,动画部分可以工作,但不会发生哇延迟。这是WOW的bug吗?是否有适用于大多数浏览器的类似 Javascript 库?
问问题
235 次
1 回答
0
我的 App.js 如下所示。
import React, { Component } from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import WOW from 'wowjs/dist/wow.js';
import './Animate.css';
import './App.css';
import {
Route,
withRouter,
Switch
} from 'react-router-dom';
class App extends Component {
componentDidMount(){
new WOW.WOW().init();
}
return (
<Layout className="app-container">
<AppHeader isAuthenticated={this.state.isAuthenticated}
currentUser={this.state.currentUser}
onLogout={this.handleLogout} />
<Content className="app-content">
<div className="middle-content">
<div className="description col-3 wow bounceIn animated" data-wow-duration="2s" data-wow-delay="1s"><h1>WE OFFER 100%</h1><h3>MONEY BACK GUARANTEE</h3>
<p>on all our quality products with hassle - free returns.
We believe you will be completely satisfied with your purchase.</p>
</div>
<div className="app-content-img fadeInRight animated">
<img src={require("./3.png")} />
</div>
</div>
它仅适用于 IE。
于 2018-08-28T12:26:23.330 回答