1/** 2 * Scroll Animation Component 3 * .sa-hidden ã¯ã©ã¹ãæã¤è¦ç´ ããã¥ã¼ãã¼ãã«å ¥ã㨠4 * .sa-visible ã«åãæ¿ãã¦ã¢ãã¡ã¼ã·ã§ã³çºç« 5 * 6 * ä½¿ãæ¹: 7 * 1. scroll-animation.css ãèªã¿è¾¼ã 8 * 2. scroll-animation.js ãèªã¿è¾¼ã 9 * 3. ã¢ãã¡ã¼ã·ã§ã³ãããè¦ç´ ã«ä»¥ä¸ã®ã¯ã©ã¹ãä»ä¸: 10 * - sa-hiddenï¼å¿ é ï¼åæéè¡¨ç¤ºï¼ 11 * - sa-fade-up / sa-fade-down / sa-fade-left / sa-fade-right / sa-fade-in / sa-scale-inï¼ã¢ãã¡ç¨®å¥ï¼ 12 * - sa-delay-1 ã sa-delay-6ï¼ãªãã·ã§ã³ï¼staggerç¨ãã£ã¬ã¤ï¼ 13 */ 14(function () { 15 'use strict'; 16 17 var targets = document.querySelectorAll('.sa-hidden'); 18 if (targets.length === 0) return; 19 20 // IntersectionObserver 対å¿ãã§ã㯠21 if (!('IntersectionObserver' in window)) { 22 // é対å¿ãã©ã¦ã¶ â å ¨é¨è¡¨ç¤º 23 Array.prototype.forEach.call(targets, function (el) { 24 el.classList.remove('sa-hidden'); 25 el.classList.add('sa-visible'); 26 }); 27 return; 28 } 29 30 var observer = new IntersectionObserver(function (entries) { 31 entries.forEach(function (entry) { 32 if (entry.isIntersecting) { 33 entry.target.classList.remove('sa-hidden'); 34 entry.target.classList.add('sa-visible'); 35 observer.unobserve(entry.target); // ä¸åº¦ã ãçºç« 36 } 37 }); 38 }, { 39 threshold: 0.15, // 15%è¦ãããçºç« 40 rootMargin: '0px 0px -40px 0px' // å°ãæåã§çºç« 41 }); 42 43 Array.prototype.forEach.call(targets, function (el) { 44 observer.observe(el); 45 }); 46 47})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.