我无法操纵使用Animate.css进行动画处理的元素的animation-duration
。我在一个形状像箭头的跨度上使用flash
动画,但它的速度太快了。所以,如果可能的话,我想放慢速度。这是我的代码:
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Roboto', sans-serif;
overflow-x: hidden;
color: #333;
}
header {
position: relative;
text-align: center;
height: 100vh;
background: linear-gradient(to right, #69bcf4, #30cc8b);
color: #fff;
}
header h1 {
padding-top: calc(50vh - 133px);
font-size: 7em;
font-weight: 100;
}
header h2 {
font-size: 2em;
}
header span {
position: absolute;
margin: auto;
right: 0;
left: 0;
bottom: 30px;
height: 4px;
width: 4px;
border-radius: 2px;
background: #fff;
animation-duration: 5s;
animation-iteration-count: infinite;
}
header span::before,
header span::after {
position: absolute;
top: -23px;
content: "";
height: 30px;
width: 4px;
border-radius: 2px;
background: #fff;
}
header span::before {
left: -10px;
transform: rotate(-45deg);
}
header span::after {
right: -10px;
transform: rotate(45deg);
}
.scroll-animations {
display: flex;
}
.scroll-animations div {
flex: 1;
padding: 20px;
text-align: center;
}
.scroll-animations div span {
font-size: 4em;
}

<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" rel="stylesheet"/>
<div class="wrapper">
<header>
<h1 class="animated bounceInDown">Lorem Ipsum</h1>
<h2 class="animated bounceInDown">lorem ipsum dolor ip semet</h2>
<span class="animated flash"></span>
</header>
<div class="scroll-animations">
<div>
<span>☎</span>
<h3>Number One</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis lacinia est. Nulla malesuada massa orci, vitae placerat lorem pharetra a.</p>
</div>
<div>
<span>♫</span>
<h3>Number Two</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis lacinia est. Nulla malesuada massa orci, vitae placerat lorem pharetra a.</p>
</div>
<div>
<span>☂</span>
<h3>Number Three</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum quis lacinia est. Nulla malesuada massa orci, vitae placerat lorem pharetra a.</p>
</div>
</div>
</div>
&#13;