文字拆分动画特效

代码语言:html

所属分类:动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title>Split text animation</title>
    <style>
        html, body {
            height: 100%;
        }

        body {
            overflow: hidden;
        }

        .box {
            max-width: 70vw;
            padding: 30px;
            margin: 0 auto;
            position: relative;
            top: 50%;
            font-size: 30px;
            line-height: 1.5;
            transform: translateY(-50%);
            perspective: 400px;
        }

        .source {
            color: skyblue;
            margin: 0 auto;
        }
        .split {
            text-align: center;
        }
        .split .characters {
            display: inline-block;
        }
        .split .separate {
            position: absolute;
        }
    </style>
    <script>
        window.console = window.console || function(t) {};
    </script>
    <script>
        if (document.location.search.match(/type=embed/gi)) {
            window.parent.postMessage("resize", "*");
        }
    </script>
</head>
<body translate="no">
    <div class="box">
        <p class="split"></p>
    </div>
    <script src='http://repo.bfw.wiki/bfwrepo/js/jquery.2.11.js'></script>
    <script src='http://repo.bfw.wiki/bfwrepo/js/TweenMax.min.js'></script>
    <script src='http://repo.bfw.wiki/bfwrepo/js/jquery.lettering.min.js'></script>
    <script>
        var textArray = ["我很喜欢BFW 这个学习社区",
            "在这里我们能找到一群爱学习的小伙伴 "];

        function random(min, max) {
            return Math.rand.........完整代码请登录后点击上方下载按钮下载查看

网友评论0