typemoneky-min.js是一款类似抖音字说文字动画效果的js插件

typemoneky-min.js是一款类似抖音字说文字动画效果的js插件

typemoneky-min.js是一款类似抖音字说文字动画效果的js插件

使用方式:

第一步引入bfwone

第二步use插件及css和css

第三步配置参数

示例代码

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>

    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <script id="bfwone" data="dep=jquery.17&err=0" type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/bfwone.js"></script>
    <script type="text/javascript">
        bready(function() {
            use(["typemoneky-min", "typemoneky-min"], function() {

                var e = new TypeMoneky({
                    debug: !1, box: demo, list: [{
                        type: "text", value: "所有的"

                    }, {
                        type: "rotate", value: "lb"
                    }, {
                        type: "text", value: "创业者", color: "white"
                    }, {
                        type: "rotate", value: "lb"
                    }, {
                        type: "text", value: "应该多花点时间"
                    }, {
                        type: "text", value: "去学习", color: "#fe131a"
                    }, {
                        type: "text", value: "别人"
                    }, {
                        type: "text", value: "是怎么失败的", color: "red"
                    }], lineHeight: 1.17, beforeCreate: function(e, t, a) {
                        e()}});
                e.init();
                var t = setInterval(function() {
                    return e.isEnd?void clearInterval(t): void e.start()}, 1e3);
            });
        });
    </script>
    <style>
        body {
            font-size: 16px;
            background: #aaa;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;

        }

        #demo {
            position: absolute;
            left: 0;
            top: 0;
            width: 414px;
            height: 736px;
            right: 0;
            margin: auto;
            max-width: 100%;
            max-height: 100%;

        }
        .tm-inner {
            background: url('http://repo.bfw.wiki/bfwrepo/image/5e145322b59bf.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_414,h_736,/quality,q_90') !important;
        }
        .isMob #demo {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body class="page-simple">
    <div id="app">

        <main class="main">
            <div id="demo">

            </div>
        </main>


    </div>
</body>
</html>


立即下载typemoneky-min.js查看所有js插件

网友评论0

程序员在线工具箱