LoginSignup
1
1

More than 3 years have passed since last update.

【CSS】寝られないからスラ〇ム動かしてみた

Last updated at Posted at 2021-04-09

はじめに

寝られないのでコーディング・・・するほど元気もないのでとりあえずスラ〇ム動かしてみた。

動かす画像

権利関係いろいろありそうなので頭のトンガリを少なくして画像作成っと
制作時間1分。やはりスラ〇ムは書きやすい。

スライムっぽい何か_.png

動かす

ここのサイトからアニメーション用のCSSをコピペ
コピペでOKみたいなサイトは本当にありがたい)
継続して動くように少し修正 animation: infinite

↓動いているところ(表示まで数秒・・・)
表示されなかったら「Result」をクリック

See the Pen GRryZMY by Shinkai (@Shinkai-) on CodePen.

やだ、可愛い。
子供が書いた絵とか動かしてあげたら喜びそう。身近に子供いないけど。

CSS

.anim-box.poyoyon2.is-animated {
  animation: poyoyon2 2s infinite forwards;
}

@keyframes poyoyon2 {
  0%  {
    transform: scale(1.0, 1.0) translate(0, 0);
  }
  15% {
    transform: scale(0.98, 0.9) translate(0, 5px);
  }
  30% {
    transform: scale(1.02, 1.0) translate(0, 8px);
  }
  50% {transform: scale(0.98, 1.05) translate(0, -8px);
  }
  70% {
    transform: scale(1.0, 0.9) translate(0, 5px);
  }
  100% {
    transform: scale(1.0, 1.0) translate(0, 0);
  }
  0%, 100% {
    opacity: 1;
  }
}

以上。

ダメだ。まだ眠くない・・・。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1