Fork me on GitHub

spin.js

spin.js (ESM) spin.umd.js spin.css

Example
















Features

Spin.js dynamically creates spinning activity indicators that can be used as a resolution-independent replacement for loading GIFs.

Installation

Run npm install spin.js, or save the spin.js and spin.css files in your repository.

JS bundling

For best performance and compatibility, it is recommended to use a module bundler such as Parcel, Rollup, or Webpack to create a production-ready code bundle. However, in modern browsers it is also possible to directly load the module via a script tag:

<script type="module" src="node_modules/spin.js/spin.js"></script>

If for some reason you can't use ECMAScript modules or a module bundler, download spin.umd.js and save it in your repository. The UMD script can be used as follows:

var spinner = new Spin.Spinner(opts).spin(target);

Note that the UMD version is only available as a temporary workaround. Longer term it is recommended to migrate to the standard ECMAScript module.

CSS

Load the spin.css file to include the default animation presets. You could alternatively create a custom CSS keyframe animation (in your own CSS file) and set it using the animation property.

Note: do not use <script> or <link> tags directly referencing the files on this website. Doing this is likely to break your app whenever a major new version is released.

Usage

Run the following code when the document has loaded:


The spin() method creates the necessary HTML elements and starts the animation. If a target element is passed as argument, the spinner is added as first child and horizontally and vertically centered.

Manual insertion

In order to manually insert the spinner into the DOM you can invoke the spin() method without any arguments and use the el property to access the HTML element:

var spinner = new Spinner().spin();
target.appendChild(spinner.el);

Hiding the spinner

To hide the spinner, invoke the stop() method, which removes the UI elements from the DOM and stops the animation. Stopped spinners may be reused by calling spin() again.

Positioning

The spinner is absolutely positioned at 50% of its offset parent. You may specify a top and left option to position the spinner manually.

Note: The spinner element is a 0×0 pixel div that represents the center of the spinner. Hence, if you passed {top:0, left:0} only the lower right quarter of the spinner would be inside the target's bounding box.

The spinner element must be surrounded by an element using relative positioning, or the spinner will be outside of the parent element.

Supported browsers

Spin.js has been successfully tested in the following browsers:

Changes

See CHANGELOG.md

Support

If you encounter any problems, please use the GitHub issue tracker.

Authors

Felix Gnass

JS ?? React ?? NodeJS ??

Twitter: @fgnass

Theodore Brown

PHP ?? TypeScript ?? SQL ??

Website: theodorejb.me
Twitter: @theodorejb

韩国毛茸茸的丰满妇女亚洲中文字幕人成乱码美女奶头全部露出来给男生吃欧美VIDEOS欧美同志DAY 老司国产精品免费视频国产亚洲精品品视频在线日韩三级片国产在线精品亚洲第1页 99久久精品在线免费热,久久成,国产久久偷拍视频,久久爱人视频,偷拍图片区亚洲图片314,恩啊舔我啊哦好爽,奇米777影音先锋播放,奇米影视444he A一级一片欧美牲交A欧美牲交aⅴ免费在线成年aⅴ动漫电影俺来也在线视频 亚洲欧美日韩综合在线一区 国产在线精品亚洲第1页 国产亚洲日韩在线三区 九九热线精品在线色视频高清在线观看成在线人免费视频播放 99九九视频高清在线_九九99线视频在线观看_99精品国产在热2019 久久亚洲精品中文字幕一区国产开嫩苞在线播放视频老师今晚让你爽个够欧美变态另类刺激 国产亚洲精品不卡视频青青草原在线观看无码三级中文在线视频丁香五月缴情在线 一日本道在线不卡视频-日本高清视频中文无码-97国产免费最新视频 无码av高清毛片在线看_日本一级特黄大片_日本毛片免费视频观看_免费v片在线观看网站 一日本道在线不卡视频-日本高清视频中文无码-97国产免费最新视频 在线中日韩高清视频_亚洲中日韩视频免费观看_中日韩高清视频在线观看 五月丁香综合缴情六月-丁香五月色六月综合缴情-五月丁香六月综合缴情基地 成人伦理在线,国产熟精品视频,啪啪免费观看大全av,777米奇色,米奇在线777在线精品视频 男人的天堂天堂AV在线AV国产亚洲视频中文字幕国内国内精品视频男人的天堂是一个专业为广大秒拍控分析秒拍福利视频的资源网站, 台湾佬娱乐中文在线网,五月婷婷深开心五月,国产,开心五月四房播播 奇米777第四免费观看_大香蕉青青青手机在线_怡春院在线播放_在线亚洲专区中文字幕 天天综合网久久综合,深爱五月综合缴情综合网,亚洲人成伊人成综合网,一本久道久久综合久久鬼色 2020天天看夜夜看狠狠看,2020天天看夜夜晚,2020天天躁夜夜躁 一本到高清在线视频观看,日本高清不卡一区二区三区-最新四色米奇影视777在线看 国产v片在线播放免费,曰本a级毛片无卡免费视频,亚洲在av极品无码高清,精品丝袜国产自在线拍 中日韩高清在线观看_荔枝视频app黄_亚洲日韩欧洲不卡在线,欧美日韩在线亚洲一 国产a片|美国a片|a片视频|a片视频|韩国a片|中国A级毛片|a片在线观看|一日本道不卡高清a无码 国产亚洲观看视频在线,亚洲精品高清视频在线观看,高清视频在线*国产a*无码不卡视频 97夜夜澡人人爽人人喊_天天躁日日躁狠狠躁_人人澡 人人澡 人人看 老司机精品视频 老司机在线国产 偷拍久久国产视频 99久久免费热 老司机久久热 亚洲 中文 自拍 另类 欧美_逼视频_伦午夜理 自拍 偷拍 亚洲 欧美 另类_曰木美女Ⅹxx 日本特黄特色大片免费视频_日本三级视频在线2019-一道本不卡高清专区,,日本在线无码中文一区免费,欧美高清无码一区不卡 新国产在热线精品视频99_99国产这里只有精品视频,新国产在热线精品视频99 97夜夜澡人人爽人人喊_天天躁日日躁狠狠躁_人人澡 人人澡 人人看 一本到高清在线视频观看,日本高清不卡一区二区三区-最新四色米奇影视777在线看 在线看片福利无码日本不卡一区二区在线国产区精品系列在线观看中文字幕亚洲日韩无线码 久久婷婷五月综合色啪_国产伊人久久大香蕉_大香蕉网伊人网4在线观看 老司国产精品免费视频国产亚洲精品品视频在线日韩三级片国产在线精品亚洲第1页 国产综合亚洲区_自拍 另类 综合 欧美_亚洲 欧美 国产 综合-aV欧美 人妻无码AV中文系列,人妻.中文字幕无码,人妻AV中文系列,熟女熟妇人妻在线视频 夜夜爽天天啊,天天曰夜夜回,天天啪久久国产,天天摸日日碰人人看,天天穞日日穞夜夜穞,天天夜夜日日高清在线 亚洲 欧美 国产 综合|亚洲 日韩 国产 有码|一本到在线视频观看^&,亚洲国产综合另类视频 老色鬼视频,银虎福利导航,西瓜影音,神马影院在线观看我不卡影院