我正在尝试在此函数中为随机工作添加一个很好的过渡,但我似乎无法让它工作,请记住我是这方面的新手。如果有人能解释我如何在单词之间添加褪色效果,我将不胜感激!
<script type="text/javascript">
jQuery(document).ready(function($) {
words = ['ASS-KICKING','MIND-BLOWING','AWESOME','SWEET'];
$(function() {
setInterval(function() {
var thisWord = words[Math.floor(Math.random() * words.length)];
$("#container").text(thisWord);
},3000);
});
});
</script>
谢谢!