本文目录

插件 jQuery.Burn 中文API文档

🌙
手机阅读
本文目录结构

插件 jQuery.Burn 中文API文档 https://github.com/Sinetheta/burn

jQuery Burn: Text flame effect

jQuery Burn applies a simple flame effect to text using the css text-shadow property. As such it will not work in older versions of IE.

Usage

To turn on effect $('.burn').burn();

To turn off effect $('.burn').burn(false);

To get a single option, set a single option, or set multiple options:

$('.burn').burn('wind'); // returns 1
$('.burn').burn('diffusion', 2); // doubles the flame size
$('.burn').burn({
  k: 10,
  w: 10
}); // waves half as long and twice as fast

Options

Option Default Description
a 0.3 Amplitude of wave motion. A larger value leads to more pronounced oscillation.
k 0.05 Wave Number. A larger value leads to more oscillations per unit length, or a more wrinkled flame.
w 10 Angular Frequency. A larger value leads to quicker oscillations, or a higher frequency.
wind 1 Skew. A negative value for "wind" would make a vertical flame lean to the left. A value of 0 would make it perfectly vertical. A positive value makes it lean to the right. The larger the value, the greater the lean.
diffusion 1 A scale factor for both horizontal and vertical offset as well as shadow blur. A larger number leads to a flame which appears larger, though less intense.
flames array Array of shadows. The option "flames" can be set to a custom array, each element of which must be an object with strict properties as defined below. This allows for complete customisation of the effect. See advanced usage for more details.

Flame object

Option Default Description
x 0 Start displacement. This value has little long term impact and is best left as 0. It represents the initial horizontal offset of a particular flame and as is used internally to store the position of that flame.
hsla [58, 96, 89, 1] Colour of the shadow in HSLA.
y 0 Height vertical offset in em. It is best to pair increasing values of y with "hotter" colours.
blur 0.1 Size/clarity of the shadow. Larger value leads to a bigger and less sharply defined shadow.

License

Copyright (c) 2012 Kevin Attfield Dual licensed under the MIT and GPL licenses.

AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

于2021年离开前端领域,目前重心放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>

于2021年离开前端领域,目前从事区块链方面工作了