UNPKG

web-scrolling-text

Version:

A lightweight, customizable text animation library for creating smooth scrolling text effects with support for React, Next.js, Angular and vanilla JavaScript

8 lines (7 loc) 1.14 kB
/** * ScrollingText-rotate v6.1.5 * build on Wed, 31 Dec 2025 04:31:22 GMT * (c) 2025 Hardik Naik * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).ScrollingTextAnimation=t.ScrollingTextAnimation||{},t.ScrollingTextAnimation.rotate=e())}(this,(function(){"use strict";var t="scrolling-text-rotate-in",e="scrolling-text-rotate-out";return function(t,e){void 0===e&&(e={});var o=e.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("@keyframes scrolling-text-rotate-in{0%,45%{opacity:0;transform:rotateY(-90deg)}to{opacity:1;transform:rotateY(0deg)}}@keyframes scrolling-text-rotate-out{0%{opacity:1;transform:rotateY(0deg)}55%,to{opacity:1;transform:rotateY(90deg)}}"),{enterAnimation:t,exitAnimation:e}}));