html代码
效果展示
jQuery文本洗牌效果插件文章来源:https://www.toymoban.com/news/detail-803251.html
文章来源地址https://www.toymoban.com/news/detail-803251.html
<div class="container">
<p class="lead">文本洗牌动画特效</p>
<h1 id="basic">A time to seek,</h1>
<h1 id="custom">and a time to lose;</h1>
</div>
css样式
*,html{font-family:Inter;box-sizing:border-box}
body{background-color:#fafafa;line-height:1.6}
.lead{font-size:1.5rem;font-weight:300}
.container{margin:150px auto;max-width:960px}
.btn{padding:1.25rem;border:0;border-radius:3px;background-color:#4f46e5;color:#fff;cursor:pointer}
.output{background:#e5e7eb;padding:2rem 1rem;border-radius:5px;margin:2rem auto;font-size:1.5rem}
js代码
<script src="cryptoWriter.js"></script>
<script>
new cryptoWriter(document.querySelector("#basic"));
var emoji = "😀😃😄😁😆😅😂🤣🥲😊😇🙂🙃😉😌";
emojis = Array.from(emoji);
new cryptoWriter(document.querySelector("#custom"), {
customSet: emojis
});
</script>
到了这里,关于jQuery文字洗牌动效的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!