Upgrade to Pro — share decks privately, control downloads, hide ads and more …

今どきのWebアニメーション実装

 今どきのWebアニメーション実装

2019/3/8 新潟グラム2019 vol.1

Yohei Isokawa

March 08, 2019
Tweet

More Decks by Yohei Isokawa

Other Decks in Programming

Transcript

  1. CSS

  2. @keyframes scaled-animation { 0% { transform: scale(1); } 50% {

    transform: scale(1.3); } 100% { transform: scale(1); } } CSS Animations
  3. Spriteアニメーション .heart.is-active { overflow: hidden; width: 100px; height: 100px; background:

    url(../sprites.png) 0 0 no-repeat; animation: sprite-animation 1.2s steps(28, start); } @keyframes sprite-animation { 0% { background-position: 0 0; } 100% { background-position: -2800px 0; } }
  4. Spriteアニメーション .heart.is-active { overflow: hidden; width: 100px; height: 100px; background:

    url(../sprites.png) 0 0 no-repeat; animation: sprite-animation 1.2s steps(28, start); } @keyframes sprite-animation { 0% { background-position: 0 0; } 100% { background-position: -2800px 0; } }
  5. SVG