【CSSアニメーション】心臓の鼓動のように要素を動かす方法
本記事は、CSSのみで画像を心臓の鼓動の動きのようにアニメーションをつける方法をまとめています。
【CSSアニメーション】心臓の鼓動のように要素を動かす方法
イメージと、ソースコードは下記のとおりです。
実装イメージ
ソースコードは、下記のとおりです。
HTML
<img class="on a-main animate animate73" src="画像URL" alt="" width="" height="" />
CSS
.animate73,.a-option73,.a-btnsub73 {-webkit-animation-timing-function: ease-in;-moz-animation-timing-function: ease-in;-o-animation-timing-function: ease-in;animation-timing-function: ease-in;-moz-animation-iteration-count: infinite;-webkit-animation-iteration-count: infinite;-o-animation-iteration-count: infinite;-ms-animation-iteration-count: infinite;animation-iteration-count: infinite;}a.a-btn {position:relative;display:inline-block;margin:auto;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;-o-box-sizing: border-box;-ms-box-sizing: border-box;box-sizing: border-box;}a.a-btn img {display: block;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;-o-box-sizing: border-box;-ms-box-sizing: border-box;}img.a-main {width:100%;position:relative;z-index: 54;}@-moz-keyframes animate73 {0%{ -moz-transform:scale(0.92);}40%{ -moz-transform:scale(0.97);}60%{ -moz-transform:scale(0.86);}80%{ -moz-transform:scale(1);}100%{ -moz-transform:scale(0.92);}}@-o-keyframes animate73 {0%{ -o-transform:scale(0.92);}40%{ -o-transform:scale(0.97);}60%{ -o-transform:scale(0.86);}80%{ -o-transform:scale(1);}100%{ -o-transform:scale(0.92);}}@-webkit-keyframes animate73 {0%{ -webkit-transform:scale(0.92);}40%{ -webkit-transform:scale(0.97);}60%{ -webkit-transform:scale(0.86);}80%{ -webkit-transform:scale(1);}100%{ -webkit-transform:scale(0.92);}}@keyframes animate73 {0%{ transform:scale(0.92);}40%{ transform:scale(0.97);}60%{ transform:scale(0.86);}80%{ transform:scale(1);}100%{ transform:scale(0.92);}}.animate73{-webkit-animation-name: animate73;-moz-animation-name: animate73;-o-animation-name: animate73;animation-name: animate73;}
.a-btn73{padding-left:0%!important;}.a-option73{top:0%!important;}.a-option73{width:20%!important;}.a-btn73{max-width:100%!important;}.animate73,.a-btnsub73,.a-option73{animation-duration:1s!important;-webkit-animation-duration:1s;-ms-animation-duration:1s;-moz-animation-duration:1s!important;}
ぜひ、自分のブログにも活用してみてください😉
以上となります。

当ブログで無料配布している「ブログの書き方テンプレート」は受け取っておりますか?無料で資料請求できますので、この機会にぜひどうぞ💁♂️
【挫折0宣言】『ワンコイン』戦略会議を開催しています
オンラインビジネスの悩みを僕に直接相談できるワークショップです。 「Zoom」を利用して開催です。ご自宅から、お気軽にどうぞ😌
- 下記ボタンをクリックで詳細をどうぞ!
【募集枠 各回2名】
嬉しいお声をいただいております

お知らせ:厳選した下記のコンテンツがおすすめです
個人から、中小企業様向けに対応しており、Webメディア構築 or リモートワーク(テレビ会議システム)の導入をご検討の方は、ぜひどうぞ🙇
おすすめコンテンツ
無料コンテンツ
- 3日間の短期集中講座|無料で学べるメディア運営
- ブログ記事テンプレート【基本構造】(無料配布)
- 30分の無料相談会&体験レッスン(オンライン開催)
- 【入門ガイド】経験ゼロ→お金を生み出すブログを開始する完全マップ
有料コンテンツ
- 3500円:ブログやメディア運営を学べるオンラインスクール
- 【1人で完結】完全在宅「リモートワークビジネス講座」
- 【最短1日で完成】ベース構築キット【早期的に、環境を構築しよう】
- 【1つ目の壁】ブログ100記事パートナー【4ヶ月で乗り越える】
- 【ネット集客】『01blog Boot Camp』【7日間プログラム】
- Web制作・デザイン・毎月の運用サポート
当ブログと他のサイトの圧倒的な違いは、様々な疑問や悩みを解決するために【無料体験レッスン】30分の無料相談会&体験レッスン(オンライン開催)に初回限定で参加できることです。
どうしても分からなかったり、1人で悩むことがあればご相談ください。
その他、ご相談&ご質問がございましたら、お気軽にどうぞ。
» お問い合わせ

僕は、こんな人です

ゾノ@スモール起業ビルダー
当ブログの筆者。日本一わかりやすいブログ教師/高校教師の職を捨て起業失敗→在宅リモートワークで月収7桁達成→V字回復。10代から不登校や非行で根っからの引きこもり人間。現在はオンライン講座『外出せずに学べるパソコン教室』を運営し生徒は累計230名。個人がマイペースに生きるコツを発信しています。朝大好きです→ #01blog朝活の会
» プロフィール詳細はこちら
チップをいただけると、心から喜びます
人気記事【ブログ書くことない】ブログ書き方テンプレートで解決【ひな形】
人気記事【発表】オンライン学習サイト完備のコミュニティ【01blog College】