GSAPで実装!一文字ずつ上下に動くローディングアニメーション

GSAPでの「y: "5px"」で上に移動させ「yoyo: true」でもとに戻し上下に波のように動くアニメーションにしています

<html style="max-height: 100%;"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js" class="manual-link"></script><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } #loading-text { font-size: 26px; text-transform: uppercase; font-weight: bold; } #loading-text span{ display: inline-block; } </style><style id="pic-style"></style></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto; margin: 0px; padding: 0px;" class="vsc-initialized"><div class="contents"> <div id="loading-text"></div> </div> <script id="js-section">// 一文字ずつ分割し配列に設定 const loadingText = document.getElementById("loading-text"); const letters = "loading...".split(""); //各文字をspanで囲む letters.forEach(letter => { const span = document.createElement("span"); span.textContent = letter; loadingText.appendChild(span); }); // gsapで、文字が上下に波のように動くよう設定 gsap.to("#loading-text span", { duration: 0.5, y: "5px", ease: "power1.inOut", stagger: { each: 0.1, yoyo: true, repeat: -1 } }); </script></body></html>

GSAPで実装!一文字ずつ縦に拡大するローディングアニメーション

GSAPで「scaleY:1.5」を指定し、1文字ずつ縦に拡大させてます

<html style="max-height: 100%;"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js" class="manual-link"></script><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } #loading-text { font-size: 26px; text-transform: uppercase; font-weight: bold; } #loading-text span { display: inline-block; } </style><style id="pic-style"></style></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto; margin: 0px; padding: 0px;" class="vsc-initialized"><div class="contents"> <div id="loading-text"></div> </div> <script id="js-section">// 一文字ずつ分割し配列に設定 const loadingText = document.getElementById("loading-text"); const letters = "loading...".split(""); //各文字をspanで囲む letters.forEach(letter => { const span = document.createElement("span"); span.textContent = letter; loadingText.appendChild(span); }); // gsapで、文字が上下に波のように動くよう設定 gsap.to("#loading-text span", { duration: 0.7, scaleY:1.5, ease: "power1.inOut", stagger: { each: 0.2, yoyo: true, repeat: -1 } }); </script></body></html>

GSAPで実装!一文字ずつ回転するローディングアニメーション

GSAPで「rotationY」を指定し、1文字ずつ1回転させてます

<html style="max-height: 100%;"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js" class="manual-link"></script><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } #loading-text { font-size: 26px; text-transform: uppercase; font-weight: bold; } #loading-text span { display: inline-block; transform-origin: center; } </style><style id="pic-style"></style></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto; margin: 0px; padding: 0px;" class="vsc-initialized"><div class="contents"> <div id="loading-text"></div> </div> <script id="js-section">// 一文字ずつ分割し配列に設定 const loadingText = document.getElementById("loading-text"); const letters = "loading...".split(""); //各文字をspanで囲む letters.forEach(letter => { const span = document.createElement("span"); span.textContent = letter; loadingText.appendChild(span); }); // gsapで、span要素にアニメーションを適用 gsap.to("#loading-text span", { duration: 1, rotationY: 360, repeat: -1, ease: "linear", stagger: 0.3 }); </script></body></html>

GSAPで実装!一文字ずつ表示されるローディングアニメーション

「span」タグに「opacity:0;」を設定し、GSAPで徐々に表示しています

<html style="max-height: 100%;"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js" class="manual-link"></script><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } #loading-text { font-size: 26px; text-transform: uppercase; font-weight:bold; } #loading-text span { opacity: 0; } </style><style id="pic-style"></style></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto; margin: 0px; padding: 0px;" class="vsc-initialized"><div class="contents"> <div id="loading-text"></div> </div> <script id="js-section">// 一文字ずつ分割し配列に設定 const loadingText = document.getElementById("loading-text"); const letters = "loading...".split(""); //各文字をspanで囲む letters.forEach(letter => { const span = document.createElement("span"); span.textContent = letter; loadingText.appendChild(span); }); // gsapで、span要素にアニメーションを適用 gsap.to("#loading-text span", { duration: 1, opacity: 1, stagger: 0.2, ease: "power2.inOut", repeat:-1 }); </script></body></html>

落ち葉が風で舞うローディングアニメーション

keyframesで「translate」と「rotate」を変化させ風で舞ったようなアニメーションにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.container { position: relative; background-image: url("https://pa-tu.work/storage/img/posts/65422eed4e578.jpg"); background-size: cover; width: 100%; aspect-ratio: 16 / 9; background-color: #fff; } .leaf { position: absolute; height: 10px; bottom: 50%; left: 45%; fill: #D0A25C; animation: floatLeaf 4s infinite ease-in-out; } .loading-text { position: absolute; left: 50%; transform: translateX(-50%); bottom: 5%; color: #fff; text-transform: uppercase; } @keyframes floatLeaf { 0% { transform: translate(-10px, 0) rotateX(280deg); } 25% { transform: translate(-5px, -50px) rotateY(180deg); } 50% { transform: translate(0, -100px) rotateX(-180deg); } 75% { transform: translate(10px, -50px) rotateX(135deg); } 100% { transform: translate(30px, 25px) rotateX(-140deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto; margin: 0px; padding: 0px;" class="vsc-initialized"><div class="container"> <svg class="leaf" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512"> <!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --> <path d="M0 32c477.6 0 366.6 317.3 367.1 366.3L448 480h-26l-70.4-71.2c-39 4.2-124.4 34.5-214.4-37C47 300.3 52 214.7 0 32zm79.7 46c-49.7-23.5-5.2 9.2-5.2 9.2 45.2 31.2 66 73.7 90.2 119.9 31.5 60.2 79 139.7 144.2 167.7 65 28 34.2 12.5 6-8.5-28.2-21.2-68.2-87-91-130.2-31.7-60-61-118.6-144.2-158.1z"></path> </svg> <p class="loading-text">loading... </p></div> <script id="js-section"> </script></body></html>

borderプロパティを使用!縦横の順に拡大するCSSローディングアニメーション

要素の幅高さを20pxにして、keyframesで要素の幅高さを変更してます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 20px; height: 20px; background-color: #000; animation: loadingAnime 2s infinite ease-in-out; overflow: hidden; } @keyframes loadingAnime { 30%,50%{ width: 20px; height: 50px; } 70%,90% { width: 50px; height: 50px; } } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

四角枠が縦横に回転するCSSローディングアニメーション

「rotateX」「rotateY」で回転させてます

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loading-item { position: relative; width: 50px; height: 50px; border-radius: 5px; background-color: #353535; box-sizing: border-box; animation: spin 3s infinite; } @keyframes spin { 0% { transform: rotateX(0deg); } 25% { transform: rotateX(180deg); } 50% { transform: rotateX(360deg) rotateY(0deg); } 75% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loading-item"></div> </div> </div> </body></html>

要素が斜めに変形するCSSローディングアニメーション

keyframesに「skewX」「skewY」を指定し変形させてます

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loading-item { position: relative; width: 50px; height: 50px; border-radius: 5px; background-color: #353535; box-sizing: border-box; animation: loadingAnime 1s infinite; } @keyframes loadingAnime { 0% { transform:skewX(0); } 25% { transform:skewX(20deg); } 50% { transform:skewY(0); } 75% { transform:skewY(20deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loading-item"></div> </div> </div> </body></html>

境界線の色を変えたCSSローディングアニメーション

keyframesで「border-color」を一つずつ変化させてます

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loading-item { width: 0; height: 0; border: 25px solid #353535; border-top-color: #efefef; border-radius: 5px; background-color: #353535; box-sizing: border-box; animation: loadingAnime 3s infinite; } @keyframes loadingAnime { 0% { border-color: #353535; border-top-color: #efefef; } 25% { border-color: #353535; border-right-color: #efefef; } 50% { border-color: #353535; border-bottom-color: #efefef; } 75% { border-color: #353535; border-left-color: #efefef; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loading-item"></div> </div> </div> </body></html>

境界線の色を変えたCSSローディングアニメーション

keyframesで「border-color」を一つずつ変化させてます

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loading-item { width: 0px; height: 0px; border: 25px double #353535; border-top-color: #efefef; border-radius: 5px; background-color: #fff; box-sizing: border-box; animation: loadingAnime 3s infinite; } @keyframes loadingAnime { 0% { border-color: #353535; border-top-color: #efefef; } 25% { border-color: #353535; border-right-color: #efefef; } 50% { border-color: #353535; border-bottom-color: #efefef; } 75% { border-color: #353535; border-left-color: #efefef; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loading-item"></div> </div> </div> </body></html>

borderプロパティを使用!拡大し四つ角に分かれるCSSローディングアニメーション

要素の幅高さを0にして、borderプロパティに「dotted」を指定。keyframesで要素の幅高さを変更してます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 0px; height: 0px; border: 10px dashed; background-color: #fff; animation: loadingAnime 2s infinite ease-in-out; overflow: hidden; } @keyframes loadingAnime { 0%,20%{ width: 0px; height: 0px; } 60%,80%{ width:40px; height:40px; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

borderプロパティを使用!中心から白背景が広がるCSSローディングアニメーション

要素の幅高さを0にして、borderプロパティで四角形を作り、keyframesでborderの幅、要素の幅高さを変更してます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 0px; height: 0px; border: 25px solid; background-color: #fff; animation: loadingAnime 1.5s infinite ease-in-out; overflow: hidden; } @keyframes loadingAnime { 80%, 100% { width: 50px; height: 50px; border: 0px solid; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

borderプロパティを使用!4つの円形に分離するCSSローディングアニメーション

要素の幅高さを0にして、borderスタイルを「dotted」に設定。四角形を作り、keyframesで要素の幅高さを変更し回転させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 0px; height: 0px; border: 25px dotted; background-color: #fff; animation: loadingAnime 1.5s infinite ease-in-out; overflow: hidden; } @keyframes loadingAnime { 0%, 20% { width: 0px; height: 0px; } 80%, 100% { width: 20px; height: 20px; transform: rotate(90deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

borderプロパティを使用!4つの枠に分離するCSSローディングアニメーション

要素の幅高さを0にして、borderスタイルを「dashed」に設定。四角形を作り、keyframesでborder、要素の幅高さを変更し回転させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 0px; height: 0px; border: 25px dashed; background-color: #fff; animation: loadingAnime 1.5s infinite ease-in-out; overflow: hidden; } @keyframes loadingAnime { 0%, 20% { width: 0px; height: 0px; } 80%, 100% { width: 40px; height: 40px; border:15px dashed; transform: rotate(90deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

四角枠から円形に変形して回転するCSSローディングアニメーション

keyframesで「transform:rotate」「border-radius:50%;」を指定し回転させながら円形にしてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 50px; height: 50px; background-color: #333; animation: loadingAnime 1.5s infinite ease-in-out; overflow: hidden; } @keyframes loadingAnime { 30%, 50% { transform: rotate(90deg); border-radius: 50%; } 80%, 100% { transform: rotate(180deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

四角枠が回転するCSSローディングアニメーション

keyframesで「transform:rotate」を指定し回転させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 50px; height: 50px; background-color: #333; animation: loadingAnime 0.5s infinite ease-in-out; overflow:hidden; } @keyframes loadingAnime { 50% { transform: translateY(10px) scale(1,.9) rotate(45deg); border-bottom-right-radius: 10px; } 100% { transform:rotate(180deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

四角枠が円形に変化するCSSローディングアニメーション

keyframesで「transform:scale」「border-radius:50%;」を指定し円形に変化させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.pic-container { display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fefefe; z-index: 0; } .loading-section { display: grid; place-items: center; width: 100vw; height: 100vh; } .loadidng-item { width: 50px; height: 50px; background-color: #333; animation: loadingAnime 2s infinite ease-in-out; } @keyframes loadingAnime { 50% { transform:scale(.7); border-radius:50%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="pic-container"> <div class="loading-section"> <div class="loadidng-item"></div> </div> </div> </body></html>

プログレスバー型のローディングアニメーション

「linear-gradient」でバーの中の色を設定し、「background-size」を変化させてプログレスバーを移動させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #121212; overflow: hidden; } .loading-area { position: relative; background-color: #535353; background-image: linear-gradient(90deg, #f7f7f7 0 100%); background-size: 0% 100%; background-repeat: no-repeat; border-radius: 7px; width: 250px; height: 10px; animation: loading-anime 2s ease infinite; } @keyframes loading-anime { 10% { background-size: 20% 100%; } 40% { background-size: 60% 100%; } 70%, 100% { background-size: 100% 100%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> </div> </div> </body></html>

プログレスバー型のローディングアニメーション

「linear-gradient」でバーの中の色を設定し、「background-size」を変化させてプログレスバーを移動させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #121212; overflow: hidden; } .loading-area { position: relative; outline:1px solid #ccc; outline-offset:10px; background-image: repeating-linear-gradient(90deg, #e7e882 0 10px,transparent 10px 20px), repeating-linear-gradient(90deg, #ccc 0 10px,transparent 10px 20px); background-size: 0% 100%,100% 100%; background-repeat: no-repeat; width: 250px; height: 30px; animation: loading-anime 2s ease infinite; } @keyframes loading-anime { 70%, 100% { background-size: 100% 100%,100% 100%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> </div> </div> </body></html>

プログレスバー型のローディングアニメーション

「linear-gradient」でバーの中の色を設定し、「background-size」を変化させてプログレスバーを移動させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #121212; overflow: hidden; } .loading-area { position: relative; background-image: radial-gradient(#ddd 40%, transparent 60%); background-size: 30px 30px; background-repeat: repeat; width: 300px; height: 30px; } .loading-area::before { position: absolute; inset: 0; background-image: radial-gradient(#06d3d3 30%, transparent 35%); background-size: 30px 30px; background-repeat: repeat; width: 0; height: 100%; content: ''; animation: loading-anime 2s ease infinite; } @keyframes loading-anime { 70%, 100% { width: 100%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> </div> </div> </body></html>

波のようなローディングアニメーション

「-webkit-background-clip: text;」で文字に背景色を設定。「background-size」をアニメーションに指定し高さを変化させて波のようにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: flex; justify-content: center; gap: 3px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif; } .loading-area span { display: inline-block; background-color: #efefef; background-image: linear-gradient(#37bcf8, #3989b2); -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-size: 100% 20%; background-position: center bottom; background-repeat: no-repeat; font-size: 2rem; font-weight: bold; animation: wave-anime 1.5s infinite linear; text-transform: uppercase; } .loading-area span:nth-child(1) { animation-delay: 0.1s; } .loading-area span:nth-child(2) { animation-delay: 0.2s; } .loading-area span:nth-child(3) { animation-delay: 0.3s; } .loading-area span:nth-child(4) { animation-delay: 0.4s; } .loading-area span:nth-child(5) { animation-delay: 0.3s; } .loading-area span:nth-child(6) { animation-delay: 0.2s; } .loading-area span:nth-child(7) { animation-delay: 0.1s; } .loading-area span:nth-child(8) { animation-delay: 0.2s; } .loading-area span:nth-child(9) { animation-delay: 0.3s; } .loading-area span:nth-child(10) { animation-delay: 0.4s; } @keyframes wave-anime { 50% { background-size: 100% 90%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <span>l</span> <span>o</span> <span>a</span> <span>d</span> <span>i</span> <span>n</span> <span>g</span> <span>.</span> <span>.</span> <span>.</span> </div> </div> </body></html>

水を注いだようなローディングアニメーション

「-webkit-background-clip: text;」で文字に背景色を設定。「background-size」をアニメーションに指定し高さを変化させて水を注いでいるようにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: flex; justify-content: center; gap: 3px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif; } .loading-area span { display: inline-block; background-color: #efefef; background-image: linear-gradient(#37bcf8 0 100%); -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-size: 100% 0%; background-position: center bottom; background-repeat: no-repeat; font-size: 2rem; font-weight: bold; animation: water-anime 2s infinite linear; text-transform: uppercase; } .loading-area span:nth-child(1) { animation-delay: 0.1s; } .loading-area span:nth-child(2) { animation-delay: 0.14s; } .loading-area span:nth-child(3) { animation-delay: 0.18s; } .loading-area span:nth-child(4) { animation-delay: 0.22s; } .loading-area span:nth-child(5) { animation-delay: 0.26s; } .loading-area span:nth-child(6) { animation-delay: 0.3s; } .loading-area span:nth-child(7) { animation-delay: 0.34s; } .loading-area span:nth-child(8) { animation-delay: 0.38s; } .loading-area span:nth-child(9) { animation-delay: 0.4s; } .loading-area span:nth-child(10) { animation-delay: 0.44s; } @keyframes water-anime { 70%, 100% { background-size: 100% 100%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <span>l</span> <span>o</span> <span>a</span> <span>d</span> <span>i</span> <span>n</span> <span>g</span> <span>.</span> <span>.</span> <span>.</span> </div> </div> </body></html>

波のようなローディングアニメーション

「-webkit-background-clip: text;」で文字に背景色を設定。「background-size」をアニメーションに指定し高さを変化させて波のようにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: flex; justify-content: center; gap: 3px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif; } .loading-area span { display: inline-block; background-color: #efefef; background-image: linear-gradient(#17bcf8, #67bcf8); -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-size: 100% 2%; background-position: center; background-repeat: no-repeat; font-size: 2rem; font-weight: bold; animation: water-anime 2s infinite linear; text-transform: uppercase; } .loading-area span:nth-child(1) { animation-delay: 0.1s; } .loading-area span:nth-child(2) { animation-delay: 0.2s; } .loading-area span:nth-child(3) { animation-delay: 0.3s; } .loading-area span:nth-child(4) { animation-delay: 0.4s; } .loading-area span:nth-child(5) { animation-delay: 0.5s; } .loading-area span:nth-child(6) { animation-delay: 0.6s; } .loading-area span:nth-child(7) { animation-delay: 0.7s; } .loading-area span:nth-child(8) { animation-delay: 0.8s; } .loading-area span:nth-child(9) { animation-delay: 0.9s; } .loading-area span:nth-child(10) { animation-delay: 1s; } @keyframes water-anime { 50%, 70% { background-size: 100% 100%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <span>l</span> <span>o</span> <span>a</span> <span>d</span> <span>i</span> <span>n</span> <span>g</span> <span>.</span> <span>.</span> <span>.</span> </div> </div> </body></html>

縦方向に縮むローディングアニメーション

keyframeで「scaleY」を指定し徐々に縮小するようにしています

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: grid; place-items: center; width: 60%; } .loading-text { color: #000; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; transform: scaleY(1.5); animation: zoomout 1.3s infinite linear; } @keyframes zoomout { 50% { transform: scaleY(.95); } 60% { transform: scaleY(1.05); } 70%, 100% { transform: scaleY(1); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

横方向に縮小するローディングアニメーション

Keyframesで「scaleX」を指定し徐々にズームアウトするようにしています

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: grid; place-items: center; width: 60%; } .loading-text { color: #000; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; transform: scaleX(1.5); animation: zoomout 1.3s infinite linear; } @keyframes zoomout { 50% { transform: scaleX(.95); } 60% { transform: scaleX(1.05); } 70%, 100% { transform: scaleX(1); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

上から文字が黒塗りされるローディングアニメーション

「-webkit-text-stroke」で文字を縁取り、before疑似要素で文字の高さを徐々に広げるアニメーションを入れてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-text { position: relative; font-size: 2rem; font-weight: bold; color: transparent; text-transform: uppercase; -webkit-text-stroke: 1px black; } .loading-text::before { position: absolute; left: 0; top: 0; overflow: hidden; width: 100%; height:0; color: black; animation: textSlide 2s infinite linear; content: "loading..."; } @keyframes textSlide { 0% { -webkit-text-stroke: 1px black; height: 0; } 70%, 100% { height: 100%; -webkit-text-stroke: 0px black; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

左からグラデーションで塗られるローディングアニメーション

before疑似要素で「-webkit-background-clip: text」を指定しグラデーションカラーをテキストに反映

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #121212; overflow: hidden; } .loading-text { position: relative; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif; font-size: 2rem; font-weight: bold; color: #545454; text-transform: uppercase; } .loading-text::before { position: absolute; left: 0; top: 0; overflow: hidden; width: 0%; color: transparent; background-image: linear-gradient(90deg, #36daf7 10%, #cbf736 90%); -webkit-text-fill-color: transparent; -webkit-background-clip: text; animation: textSlide 2s infinite linear; content: "loading..."; } @keyframes textSlide { 70%, 100% { width: 100%; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

傾斜させた文字が回転するローディングアニメーション

skew関数で傾斜させた文字をkeyframeで戻しアニメーションにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { perspective: 120px; } .loading-text { color: #000; font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; transform: skew(90deg, 20deg); animation: skewText 2s infinite linear; } @keyframes skewText { 70%, 100% { transform: skew(0deg, 0deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

傾斜させた文字が回転するローディングアニメーション

skew関数で傾斜させた文字をkeyframeで戻しアニメーションにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { perspective: 120px; } .loading-text { color: #000; font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; transform: skew(90deg, 90deg); animation: skewText 2s infinite linear; } @keyframes skewText { 70%, 100% { transform: skew(0deg, 0deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

文字を一文字ずつ傾斜させたローディングアニメーション

skew関数で傾斜させた文字をkeyframeで戻したアニメーション。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: flex; justify-content: center; } .loading-area span { position: relative; display: block; color: #000; font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; text-align: center; transform: skew(40deg, 60deg); animation: skewText 2s infinite linear; } @keyframes skewText { 70%, 100% { transform: skew(0deg, 0deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <span>l</span> <span>o</span> <span>a</span> <span>d</span> <span>i</span> <span>n</span> <span>g</span> <span>.</span> <span>.</span> <span>.</span> </div> </div> </body></html>

伸び縮みするローディングアニメーション

keyframeで「scaleX」「scaleY」を指定し文字が伸び縮みするアニメーションにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; } .loading-area {} .loading-text { color: #000; font-size: 2rem; font-weight: bold; text-transform: uppercase; animation: textShadow 2s infinite linear; transform: scaleX(1); } @keyframes textShadow { 50% { transform: scaleX(2) scaleY(.9); } 60%{ transform: scaleX(0.8); } 65%{ transform: scaleX(1.2); } 75%{ transform: scaleX(0.9); } 80%{ transform: scaleX(1.1); } 85%,100%{ transform: scaleX(1); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

「text-shadow」で文字をずらしたローディングアニメーション

keyframeで「text-shadow」を指定し文字が下にずれるアニメーションにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; } .loading-area {} .loading-text { color: #000; font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; animation: textShadow 2s infinite linear; } @keyframes textShadow { 0% { text-shadow: 0 0 0; } 50% { text-shadow: 5px 5px 0 #999, 5px 5px 0 #999; } 100% { text-shadow: 5px 5px 0 #cdcdcd, 10px 10px 0 #efefef; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

円形要素を回転させ文字が現れるローディングアニメーション

keyframeで「rotateY」を指定しbefore疑似要素で生成した円形要素を回転させてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: flex; justify-content: center; gap: 15px } .loading-area span { position: relative; display: block; color: #000; font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; width: 30px; height: 30px; text-align: center; } .loading-area span::before { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background-color: black; content: ''; filter: blur(5px); animation: rotate 4s infinite linear; } @keyframes rotate { 70%, 100% { transform: translate(-50%, -50%) rotateY(90deg); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <span>l</span> <span>o</span> <span>a</span> <span>d</span> <span>i</span> <span>n</span> <span>g</span> <span>.</span> <span>.</span> <span>.</span> </div> </div> </body></html>

上から文字がスライドするローディングアニメーション

keyframeで「translateY」を指定し上から文字がスライドするアニメーションにしています。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { overflow: hidden; } .loading-text { color: #000; font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif; font-size: 2rem; font-weight: bold; text-transform: uppercase; animation: slide 2s infinite linear; } @keyframes slide { 0% { transform: translateY(-200%); } 30% { transform: translateY(5px); } 35% { transform: translateY(0); } 40% { transform: translateY(2px); } 45% { transform: translateY(0); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

左から文字が黒塗りされるローディングアニメーション

「-webkit-text-stroke」で文字を縁取り、before疑似要素で文字の幅を徐々に広げるアニメーションを入れてます。

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-text { position: relative; font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif; font-size: 2rem; font-weight: bold; color: transparent; text-transform: uppercase; -webkit-text-stroke: 1px black; } .loading-text::before { position: absolute; left: 0; top: 0; overflow: hidden; width: 0; color: black; animation: textSlide 2s infinite linear; content: "loading..."; } @keyframes textSlide { 0% { -webkit-text-stroke: 1px black; width: 0; } 70%, 100% { width: 100%; -webkit-text-stroke: 0px black; } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>

ズームアウトするローディングアニメーション

keyframeで「scale」を指定し徐々にズームアウトするようにしています

<html style="max-height: 100%;"><head><script id="js-section"> </script><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><style id="basic-style">body,#svg-section{font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body,svg{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}</style><style id="root-style">:root{--pic-image-data:none;}</style><style id="out-style">.contents { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; box-sizing: border-box; background-color: #fff; overflow: hidden; } .loading-area { display: grid; place-items: center; width: 60%; } .loading-text { color: #000; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Me; font-size: 2rem; font-weight: bold; text-transform: uppercase; transform: scale(1.5); animation: zoomout 1.3s infinite linear; } @keyframes zoomout { 50% { transform: scale(.95); } 60% { transform: scale(1.05); } 70%, 100% { transform: scale(1); } } </style><style id="pic-style"></style><style id="body-style">body,#svg-section {font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue','游ゴシック Medium',YuGothic,YuGothicM,'Hiragino Kaku Gothic ProN',メイリオ,Meiryo,sans-serif;}</style><link href="chrome-extension://nffaoalbilbmmfgbnbgppjihopabppdk/inject.css" type="text/css" rel="stylesheet"></head><body id="svg-section" style="width: 600px; height: 337.5px; transform-origin: left top; transform: scale(1); overflow: auto;" class="vsc-initialized"><div class="contents"> <div class="loading-area"> <p class="loading-text">loading...</p> </div> </div> </body></html>