CSS だけで作るローディング画像 ④
= Type 13 =
= 画像ファイルを用意する必要がありません =

  フリーで使えるローディング画像 -《総目次》
 CSS ④ 
  • 画像や JavaScript を使わずに、CSS だけでシンプルにローディングアニメーションを表示させる方法です。
  • HTML ソースと、CSS ソースをページ内に表示しましたので、コピーしてお使いください。
  • 色を変えることができます。CSS の「 color:」や「border」などの部分を、ボディカラーなどに合わせて適切な色を設定してください。
    *カラーサンプルはこちらが便利です。
  • 大きさを変えることもできます。CSS の「width:」と「 height:」が基本ですが、複雑なタイプもありますので工夫をしてください。
《 Type 13 》
HTML ソース  Copy HTMLソース
<div class="self-building-square-spinner"><div class="square"></div><div class="square"></div><div class="square"></div><div class="square clear"></div><div class="square"></div><div class="square"></div><div class="square clear"></div><div class="square"></div><div class="square"></div></div>
CSS ソース  Copy CSSソース
.self-building-square-spinner, .self-building-square-spinner * {
      box-sizing: border-box;
    }

    .self-building-square-spinner {
      height: 40px;
      width: 40px;
      top: calc( -10px * 2 / 3);
    }

    .self-building-square-spinner .square {
      height: 10px;
      width: 10px;
      top: calc( -10px * 2 / 3);
      margin-right: calc(10px / 3);
      margin-top: calc(10px / 3);
      background: PowderBlue;
      float: left;
      position:relative;
      opacity: 0;
      animation: self-building-square-spinner 6s infinite;
    }

    .self-building-square-spinner .square:nth-child(1) {
      animation-delay: calc(300ms * 6);
    }

    .self-building-square-spinner .square:nth-child(2) {
      animation-delay: calc(300ms * 7);
    }

    .self-building-square-spinner .square:nth-child(3) {
      animation-delay: calc(300ms * 8);
    }

    .self-building-square-spinner .square:nth-child(4) {
      animation-delay: calc(300ms * 3);
    }

    .self-building-square-spinner .square:nth-child(5) {
      animation-delay: calc(300ms * 4);
    }

    .self-building-square-spinner .square:nth-child(6) {
      animation-delay: calc(300ms * 5);
    }

    .self-building-square-spinner .square:nth-child(7) {
      animation-delay: calc(300ms * 0);
    }

    .self-building-square-spinner .square:nth-child(8) {
      animation-delay: calc(300ms * 1);
    }

    .self-building-square-spinner .square:nth-child(9) {
      animation-delay: calc(300ms * 2);
    }

    .self-building-square-spinner .clear{
      clear: both;
    }

    @keyframes self-building-square-spinner {
      0% {
        opacity: 0;
      }
      5% {
        opacity: 1;
        top: 0;
      }
      50.9% {
        opacity: 1;
        top: 0;
      }
      55.9% {
        opacity: 0;
        top: inherit;
      }
    }
GitHubで表示
スポンサーリンク
  フリーで使えるローディング画像 -《総目次》
スピード 
サイズ 
人気度 
透過処理 
SVG画像 
Web Font
CSS ① 
CSS ② 
CSS ③ 
CSS ④ 
CSS ⑤ 
CSS ⑥ 
CSS ⑦ 
スポンサーリンク
スポンサーリンク

おすすめサイト・関連サイト…

スポンサーリンク
Last updated : 2024/06/30
 Copied ! 
 Click to Copy