Glitter.js - 文本视觉渲染工具


Apache
跨平台
JavaScript

软件简介

Glitter.js 可以给文本添加绚丽的视觉效果,比如动态颜色变换、光影移动等。

下载之后直接引用

<script type="text/javascript" src="glitter.js"></script>

示例代码

glitter('#text-id', {
    loopPeriod: 5000,        //ms between each glitter
    maxIteration: undefined, //maximum number of glitters
    accentTime: 100,         //time the accent class is shown
    highlightTime: 20,        //time the highlight class is shown 
    downlightTime: 20,        //time the downlight class is shown
    rtl: false,              //direction of the glitter
    travelPeriod: 40,        //ms between each subsequent letter glitter
    flipping: false          //makes half loop between default and accent
});