0
當我遇到一些很酷的東西時,我試圖提高我的網絡技能。最近我遇到了這種CSS文字動畫,其中單詞被刪除並且新單詞是類型。這些鏈接都低於:如何做一個特定的JQUERY文本動畫?
我也試圖從https://jsfiddle.net/krs8785/jdfgo5on/複製,但如何讓動畫效果嗎?
參考 - https://codyhouse.co/gem/css-animated-headlines
<div class="inner">
<h2 class="animated-headline" data-delay=2000>A investment service built for
<br>
<span class="animation fifth">unpredictable markets.</span>
<span class="typed-cursor">|</span>
<span class="headline-partial">retiring comfortably.</span>
<span class="headline-partial">lowering fees.</span>
<span class="headline-partial">dreaming big.</span>
</h2>
</div>
<style>
.inner .animated-headline .animation,
.inner .animated-headline .animation.first {
color: #90caf9
}
.inner .animated-headline .animation.second {
color: #7fb800
}
.inner .animated-headline .animation.third {
color: #ffb400
}
.inner .animated-headline .animation.fourth {
color: #90caf9
}
.inner .animated-headline .animation.fifth {
color: #7fb800
}
.inner .animated-headline .headline-partial {
display: none
}
@keyframes blink {
0%, 100% {
opacity: 1
}
50% {
opacity: 0
}
}
.inner .animated-headline .typed-cursor {
color: #999;
font-weight: 300;
opacity: 1;
animation: blink .7s infinite;
display: inline-block
}
</style>
這不是一個CSS動畫,它是一個jQuery動畫。 – junkfoodjunkie
關於如何做的任何提示? – krs8888
Chk此鏈接:http://www.mattboldt.com/demos/typed-js/ –