{"id":4945,"date":"2019-12-24T15:04:39","date_gmt":"2019-12-24T06:04:39","guid":{"rendered":"http:\/\/www.otwo.jp\/blog\/?p=4945"},"modified":"2020-06-30T13:55:59","modified_gmt":"2020-06-30T04:55:59","slug":"css_animation","status":"publish","type":"post","link":"https:\/\/www.otwo.jp\/blog\/css_animation\/","title":{"rendered":"\u3010\u4fdd\u5b58\u7248\u3011CSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e\u30fb\u4f7f\u3044\u65b9\u30fb\u30b5\u30f3\u30d7\u30eb"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_main.png\" alt=\"\" width=\"700\" height=\"400\" class=\"alignnone size-full wp-image-5062\" srcset=\"https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_main.png 700w, https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_main-150x86.png 150w, https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_main-300x171.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>\u3053\u3093\u306b\u3061\u306f\u3002<br \/>\nWeb\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u5c71\u672c\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306fCSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e\u3084\u8a73\u7d30\u3001\u4f7f\u3044\u65b9\u306e\u4f8b\u306a\u3069\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\uff01<\/p>\n<div class=\"pageContents\">\n<p class=\"title\">\u3082\u304f\u3058<\/p>\n<dl>\n<dt><a href=\"#step1\">CSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3068\u306f\uff1f<\/a><\/dt>\n<dt><a href=\"#step2\">animation<\/a><\/dt>\n<dd><a href=\"#step2-1\">\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/a><\/dd>\n<dd><a href=\"#step2-2\">\u7a2e\u985e<\/a><\/dd>\n<dd><a href=\"#step2-3\">\u5404\u8a73\u7d30<\/a><\/dd>\n<dd><a href=\"#step2-4\">\u30b5\u30f3\u30d7\u30eb<\/a><\/dd>\n<dt><a href=\"#step3\">transition<\/a><\/dt>\n<dd><a href=\"#step3-1\">\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/a><\/dd>\n<dd><a href=\"#step3-2\">\u7a2e\u985e<\/a><\/dd>\n<dd><a href=\"#step3-3\">\u5404\u8a73\u7d30<\/a><\/dd>\n<dd><a href=\"#step3-4\">\u30b5\u30f3\u30d7\u30eb<\/a><\/dd>\n<dt><a href=\"#step4\">\u611f\u60f3<\/a><\/dt>\n<\/dl>\n<\/div>\n<h1 id=\"step1\">CSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3068\u306f\uff1f<\/h1>\n<p>CSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3068\u306f\u3001CSS\u3060\u3051\u3067\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u306e\u3053\u3068\u3067\u3059\u3002<br \/>\nanimation\u3068transition\u306e\uff12\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\nanimation\u306f<span style=\"color: red;\">\u518d\u751f\u56de\u6570\u3092\u6307\u5b9a\u3057\u305f\u308a\u9006\u518d\u751f\u3084\u9045\u5ef6\u3057\u3066\u518d\u751f\u306a\u3069\u8a73\u7d30\u306a\u6307\u5b9a<\/span>\u304c\u53ef\u80fd\u3067\u3059\u304c\u3001transition\u306f<span style=\"color: red;\">hover\uff08\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\uff09\u306a\u3069\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\uff11\u5ea6\u3060\u3051<\/span>\u306e\u518d\u751f\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4e3b\u306a\u9055\u3044\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u25bcanimation<br \/>\n\u30fb\u30eb\u30fc\u30d7\u3067\u304d\u308b<br \/>\n\u30fb\u672c\u683c\u7684\u306a\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u304c\u3067\u304d\u308b<br \/>\n\u30fb\u518d\u751f\u5f8c\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u7d99\u7d9a\u304c\u3067\u304d\u308b<br \/>\n\u30fb\u81ea\u52d5\u518d\u751f\u304c\u3067\u304d\u308b<\/br><br \/>\n\u25bctransition<br \/>\n\u30fb\u30eb\u30fc\u30d7\u3067\u304d\u306a\u3044<br \/>\n\u30fbhover\u7b49\u306e\u304d\u3063\u304b\u3051\u304c\u5fc5\u8981\uff08\u81ea\u52d5\u518d\u751f\u3067\u304d\u306a\u3044\uff09<br \/>\n\u30fb\u518d\u751f\u5f8c\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u5143\u306b\u623b\u308b\n<\/div>\n<h1 id=\"step2\">animation<\/h1>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_key.png\" alt=\"\" width=\"700\" height=\"225\" class=\"alignnone size-full wp-image-5059\" srcset=\"https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_key.png 700w, https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_key-150x48.png 150w, https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_key-300x96.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><br \/>\nanimation\u306f@keyframes\u3092\u4f7f\u3063\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2 id=\"step2-1\">\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/h2>\n<p>\u307e\u3068\u3081\u3066\u66f8\u3044\u305f\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\nname\u3084\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u4efb\u610f\u3067\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30d9\u30f3\u30c0\u30fc\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\uff08-webkit-\u3001-moz-\uff09\u3082\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\"><code>\u2605\u2605\u2605 \uff11\u3064\u305a\u3064\u66f8\u3044\u305f\u5834\u5408 \u2605\u2605\u2605\r\n.con{\r\n    animation-name: name;\r\n    animation-duration: 1s;\r\n    animation-delay: 0.5s;\r\n    animation-timing-function: ease-in-out;\r\n    animation-iteration-count: infinite;\r\n    animation-direction:alternate;\r\n}\r\n\u2605\u2605\u2605 \u307e\u3068\u3081\u3066\u66f8\u3044\u305f\u5834\u5408 \u2605\u2605\u2605\r\n.con{\r\n    animation: name 1s 0.5s ease-in-out infinite alternate;\r\n}\r\n\r\n\u2605\u2605\u2605 \u8907\u6570\u3092\u307e\u3068\u3081\u3066\u66f8\u3044\u305f\u5834\u5408 \u2605\u2605\u2605\r\n.con{\r\n    animation: name 1s 0.5s ease-in-out infinite alternate , name2 1s 1.5s ease-in-out infinite;\r\n}\r\n\r\n@keyframes name{\r\n    0%{\r\n    }\r\n    100%{\r\n    }\r\n}\r\n<\/code><\/pre>\n<\/div>\n<h2 id=\"step2-2\">\u7a2e\u985e<\/h2>\n<p>animation\u306e\u7a2e\u985e\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n<a href=\"#con1\">animation-name<\/a> \uff1a \u30ad\u30fc\u30d5\u30ec\u30fc\u30e0\u306e\u540d\u524d<br \/>\n<a href=\"#con2\">animation-duration<\/a> \uff1a \u304b\u304b\u308b\u6642\u9593<br \/>\n<a href=\"#con3\">animation-timing-function<\/a> \uff1a \u901f\u5ea6<br \/>\n<a href=\"#con4\">animation-delay<\/a> \uff1a \u4f55\u79d2\u5f8c\u306b\u958b\u59cb\u3059\u308b\u304b<br \/>\n<a href=\"#con5\">animation-iteration-count<\/a> \uff1a \u56de\u6570\u30fb\u30eb\u30fc\u30d7\u6307\u5b9a<br \/>\n<a href=\"#con6\">animation-direction<\/a> \uff1a \u518d\u751f\u3059\u308b\u65b9\u5411<br \/>\n<a href=\"#con7\">animation-fill-mode<\/a> \uff1a \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u524d\u5f8c\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u72b6\u614b<br \/>\n<a href=\"#con8\">animation-play-state<\/a> \uff1a \u4e00\u6642\u505c\u6b62\u30fb\u518d\u751f\u306e\u6307\u5b9a<br \/>\n<a href=\"#con9\">@keyframes<\/a> \uff1a \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u5909\u5316\u306e\u6307\u5b9a\n<\/div>\n<h2 id=\"step2-3\">\u5404\u8a73\u7d30<\/h2>\n<h3 id=\"con1\">animation-name\uff08\u30ad\u30fc\u30d5\u30ec\u30fc\u30e0\u306e\u540d\u524d\uff09<\/h3>\n<p>\u3069\u306e@keyframes\u3092\u4f7f\u7528\u3059\u308b\u304b\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<h3 id=\"con2\">animation-duration\uff08\u304b\u304b\u308b\u6642\u9593\uff09<\/h3>\n<p>\u4f55\u79d2\u9593\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3055\u305b\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fb0s\uff1a\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fb1s\u3084100ms\u306a\u3069\n<\/div>\n<h3 id=\"con3\">animation-timing-function\uff08\u901f\u5ea6\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u901f\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fbease\uff1a\u3086\u3063\u304f\u308a\u59cb\u307e\u3063\u3066\u3001\u3086\u3063\u304f\u308a\u7d42\u308f\u308b\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fbease-in\uff1a\u3086\u3063\u304f\u308a\u59cb\u307e\u308b<br \/>\n\u30fbease-out\uff1a\u3086\u3063\u304f\u308a\u7d42\u308f\u308b<br \/>\n\u30fbease-in-out\uff1aease\u3088\u308a\u3055\u3089\u306b\u3086\u3063\u304f\u308a\u59cb\u307e\u3063\u3066\u3001\u3086\u3063\u304f\u308a\u7d42\u308f\u308b<br \/>\n\u30fblinear\uff1a\u4e00\u5b9a\u306e\u901f\u5ea6\u3067\u59cb\u307e\u3063\u3066\u7d42\u308f\u308b<br \/>\n\u30fbstep-start\uff1a\u6700\u521d\u304b\u3089\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u7d42\u4e86\u6642\u306e\u72b6\u614b\u306b\u306a\u308b<br \/>\n\u30fbstep-end\uff1a\u6700\u5f8c\u306b\u4e00\u77ac\u3067\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u7d42\u4e86\u6642\u306e\u72b6\u614b\u306b\u306a\u308b<br \/>\n\u30fbsteps(n , flag)\uff1an\u306e\u56de\u6570\u3060\u3051\u30b3\u30de\u9001\u308a\u3059\u308b\u3002flag\u3092\u300cstart\u300d\u306b\u3059\u308b\u3068\u958b\u59cb\u76f4\u5f8c\u306b\uff11\u6bb5\u968e\u76ee\u306e\u5909\u5316\u304c\u767a\u751f\u3002\u300cend\u300d\u306b\u3059\u308b\u3068\u3001\u6700\u521d\u306e\u30a4\u30f3\u30bf\u30fc\u30d0\u30eb\u7d4c\u904e\u5f8c\u306b\uff11\u6bb5\u968e\u76ee\u306e\u5909\u5316\u304c\u767a\u751f\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306fend\u3067\u3001\u8a18\u8f09\u305b\u305a\u306b\u7701\u7565\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3002<br \/>\n\u30fbcubic-bezier(x1, y1, x2, y2)\uff1a[0.0 , 0.0] \u304b\u3089\u59cb\u307e\u308a\u3001[x1 , y1], [x2 , y2] \u3092\u7d4c\u7531\u3057\u3066\u6700\u7d42\u7684\u306b[1.0 , 1.0]\u306b\u5909\u5316\u3002X\u8ef8\u306f\u6642\u9593\u7d4c\u904e\u7387\u3001Y\u8ef8\u306f\u5909\u5316\u7387\u3092\u8868\u3059\u3002x\u306f0.0 \uff5e 1.0\u307e\u3067\u3001y\u306f\u57fa\u672c\u81ea\u7531\u3067\u8ca0\u306e\u5024\u3082\u4f7f\u7528\u53ef\n<\/div>\n<p>steps\u306b\u3064\u3044\u3066\u66f8\u304f\u3068\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u307e\u305f\u5225\u306e\u6a5f\u4f1a\u306b\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u7c21\u5358\u306b\u3044\u3046\u3068<span style=\"color: red;\">\u30b3\u30de\u64ae\u308a\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3<\/span>\u307f\u305f\u3044\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u8a66\u3057\u306b\u30c1\u30e3\u30ab\u304f\u3093\uff08\u5f0a\u793epeakvox\u30ec\u30fc\u30d9\u30eb\u306e\u30aa\u30ea\u30b8\u30ca\u30eb\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\uff09\u3092steps\u3067\u52d5\u304b\u3057\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<style>\n.area{\n\theight:150px;\n\tposition:relative;\n}\n.chaka{\n\tposition:absolute;\n\tleft:0;\n\ttop:0;\n\theight:121px;\n\twidth:79px;\n\tbackground:url(http:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2020\/01\/chaka.png) no-repeat;\n\tanimation: chakaFlont 2.9s steps(20) infinite;\n\tz-index:100;\n}\n@keyframes chakaFlont{\n\tto{\n\t\tbackground-position: -1580px 0;\n\t}\n}\n@-webkit-keyframes chakaFlont{\n\tto{\n\t\tbackground-position: -1580px 0;\n\t}\n}\n@-moz-keyframes chakaFlont{\n\tto{\n\t\tbackground-position: -1580px 0;\n\t}\n}\n<\/style>\n<div class=\"area\">\n<div class=\"chaka\"><\/div>\n<\/div>\n<p>\u25bc\u5143\u306e\u753b\u50cf<br \/>\n<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2020\/01\/chaka.png\" alt=\"\" width=\"1580\" height=\"121\" class=\"alignnone size-full wp-image-5045\" \/><\/p>\n<p>\u30b3\u30de\u3092\u5897\u3084\u305b\u3070\u305d\u306e\u5206\u306a\u3081\u3089\u304b\u306a\u52d5\u304d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3 id=\"con4\">animation-delay\uff08\u4f55\u79d2\u5f8c\u306b\u958b\u59cb\u3059\u308b\u304b\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u4f55\u79d2\u5f8c\u306b\u958b\u59cb\u3059\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fb0s\uff1a\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fb1s\u3084100ms\u306a\u3069\n<\/div>\n<h3 id=\"con5\">animation-iteration-count\uff08\u56de\u6570\u30fb\u30eb\u30fc\u30d7\u6307\u5b9a\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u4f55\u56de\u518d\u751f\u3059\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fb1\uff1a\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fb1.5\uff1a\u5c0f\u6570\u70b9\u3082\u53ef<br \/>\n\u30fbinfinite\uff1a\u7121\u9650\u30eb\u30fc\u30d7\n<\/div>\n<h3 id=\"con6\">animation-direction\uff08\u518d\u751f\u3059\u308b\u65b9\u5411\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u518d\u751f\u3059\u308b\u65b9\u5411\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<br \/>\n\uff12\u56de\u4ee5\u4e0a\u518d\u751f\u3059\u308b\u5834\u5408\u306e\u307f\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fbnormal\uff1a\u901a\u5e38\u65b9\u5411\u3092\u5b9f\u884c\u3059\u308b\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fbalternate\uff1a\u901a\u5e38\u65b9\u5411\u3068\u3001\u9006\u65b9\u5411\u3092\u7e70\u308a\u8fd4\u3059<br \/>\n\u30fbreverse\uff1a\u6bce\u56de\u9006\u65b9\u5411\u3092\u5b9f\u884c\u3059\u308b<br \/>\n\u30fbalternate-reverse\uff1a\u901a\u5e38\u65b9\u5411\u3068\u3001\u9006\u65b9\u5411\u3092\u7e70\u308a\u8fd4\u3059\uff08\u9006\u518d\u751f\u304b\u3089\u59cb\u307e\u308b\uff09\n<\/div>\n<h3 id=\"con7\">animation-fill-mode\uff08\u5b9f\u884c\u524d\u30fb\u5b9f\u884c\u5f8c\u306e\u72b6\u614b\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u518d\u751f\u524d\u5f8c\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fbnone\uff1a\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fbforwards\uff1a\u518d\u751f\u5f8c\u3082\u3001@keyframes(100%)\u306e\u30b9\u30bf\u30a4\u30eb\u304c\u9069\u7528\u3055\u308c\u305f\u307e\u307e\u306b\u306a\u308b<br \/>\n\u30fbbackwards\uff1a\u518d\u751f\u524d\u306f\u3001@keyframes(0%)\u306e\u30b9\u30bf\u30a4\u30eb\u304c\u9069\u7528\u3055\u308c\u308b\u3002\uff08animation-delay\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3082\u542b\u3080\uff09<br \/>\n\u30fbboth\uff1a\u518d\u751f\u524d\u306f@keyframes(0%)\u304c\u3001\u518d\u751f\u5f8c\u306f@keyframes(100%)\u306e\u30b9\u30bf\u30a4\u30eb\u304c\u9069\u7528\u3055\u308c\u308b\n<\/div>\n<h3 id=\"con8\">animation-play-state\uff08\u4e00\u6642\u505c\u6b62\u30fb\u518d\u751f\u306e\u6307\u5b9a\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u518d\u751f\u4e2d\u304b\u3001\u4e00\u6642\u505c\u6b62\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<br \/>\n\u4e00\u6642\u505c\u6b62\u3055\u308c\u305f\u5834\u5408\u3001\u505c\u6b62\u3057\u305f\u6642\u70b9\u306e\u72b6\u614b\u3067\u6b62\u307e\u308a\u307e\u3059\u3002<br \/>\n\u518d\u958b\u3055\u308c\u305f\u3068\u304d\u306f\u3001\u6700\u521d\u304b\u3089\u3067\u306f\u306a\u304f<span style=\"color: red;\">\u7d9a\u304d\u304b\u3089\u518d\u751f<\/span>\u3055\u308c\u307e\u3059\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fbrunning\uff1a\u518d\u751f\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fbpaused\uff1a\u4e00\u6642\u505c\u6b62\n<\/div>\n<h3 id=\"con9\">@keyframes\uff08\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u5909\u5316\u306e\u6307\u5b9a\uff09<\/h3>\n<p>\u66f8\u304d\u65b9\u304c\u4f55\u7a2e\u985e\u304b\u3042\u308a\u307e\u3059\u3002<br \/>\n\u8a18\u8f09\u3059\u308b\u3068\u304d\u306f\u30d9\u30f3\u30c0\u30fc\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\uff08@-webkit-keyframes\u3001@-moz-keyframes\uff09\u3082\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\"><code>\u2605\u2605\u2605 \u901a\u5e38\u306e\u66f8\u304d\u65b9 \u2605\u2605\u2605\r\n@keyframes name{\r\n    0%{\r\n    }\r\n    100%{\r\n    }\r\n}\r\n<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\"><code>\u2605\u2605\u2605 \u6700\u5f8c\u3060\u3051\u6307\u5b9a\u3057\u3066\u3082\u52d5\u304f \u2605\u2605\u2605\r\n@keyframes name{\r\n    100%{\r\n    }\r\n}\r\n<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\"><code>\u2605\u2605\u2605 \u6700\u521d\u3068\u6700\u5f8c\u3060\u3051\u6307\u5b9a \u2605\u2605\u2605\r\n@keyframes name{\r\n    from{\r\n    }\r\n    to{\r\n    }\r\n}\r\n<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\"><code>\u2605\u2605\u2605 \u7d30\u304b\u304f\u6307\u5b9a \u2605\u2605\u2605\r\n@keyframes name{\r\n    0%{\r\n    }\r\n    25%{\r\n    }    \r\n    50%{\r\n    }\r\n    75%{\r\n    }    \r\n    100%{\r\n    }\r\n}\r\n<\/code><\/pre>\n<\/div>\n<h2 id=\"step2-4\">\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p>\u6570\u7a2e\u985e\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u7528\u610f\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u3082\u3057\u4f7f\u7528\u3055\u308c\u308b\u5834\u5408\u306f\u9069\u5f53\u306b\u6570\u5024\u3084\u540d\u524d\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p class=\"codepen\" data-height=\"600\" data-theme-id=\"dark\" data-default-tab=\"result\" data-user=\"otwo\" data-slug-hash=\"abzprvo\" style=\"height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\" data-pen-title=\"abzprvo\">\n  <span>See the Pen <a href=\"https:\/\/codepen.io\/otwo\/pen\/abzprvo\"><br \/>\n  abzprvo<\/a> by otwo (<a href=\"https:\/\/codepen.io\/otwo\">@otwo<\/a>)<br \/>\n  on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/span>\n<\/p>\n<p><script async src=\"https:\/\/static.codepen.io\/assets\/embed\/ei.js\"><\/script><br \/>\n\u203b\uff11\u56de\u306e\u307f\u518d\u751f\u3057\u3066\u3044\u308b\u3082\u306e\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u306e\u53f3\u4e0b\u306b\u3042\u308b\u300cRerun\u300d\u30dc\u30bf\u30f3\u3067\u3054\u78ba\u8a8d\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n<h1 id=\"step3\">transition<\/h1>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_tran.png\" alt=\"\" width=\"700\" height=\"225\" class=\"alignnone size-full wp-image-5060\" srcset=\"https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_tran.png 700w, https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_tran-150x48.png 150w, https:\/\/www.otwo.jp\/blog\/wp-content\/uploads\/2019\/12\/css_anime_tran-300x96.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><br \/>\n\u30dc\u30bf\u30f3\u306e\u30db\u30d0\u30fc\u306a\u3069\u306b\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001transition\u306e\u307b\u3046\u304c\u624b\u8efd\u3067\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/p>\n<h2 id=\"step3-1\">\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/h2>\n<p>animation\u540c\u69d8\u30d9\u30f3\u30c0\u30fc\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\uff08-webkit-\u3001-moz-\uff09\u3082\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\"><code>\u2605\u2605\u2605 \uff11\u884c\u305a\u3064\u66f8\u3044\u305f\u5834\u5408 \u2605\u2605\u2605\r\n.con{\r\n    transition-property: width;\r\n    transition-duration: 2s;\r\n    transition-timing-function: linear;\r\n    transition-delay: 0s;\r\n}\r\n\r\n\u2605\u2605\u2605 \u307e\u3068\u3081\u3066\u66f8\u3044\u305f\u5834\u5408 \u2605\u2605\u2605\r\n.con{\r\n    transition: width 2s linear 0s;\r\n}\r\n\r\n\u2605\u2605\u2605 \u8907\u6570\u3092\u307e\u3068\u3081\u3066\u66f8\u3044\u305f\u5834\u5408 \u2605\u2605\u2605\r\n.con{\r\n    transition: width,background-color 3s,2s ease,linear 0s,0s;\r\n}\r\n<\/code><\/pre>\n<\/div>\n<h2 id=\"step3-2\">\u7a2e\u985e<\/h2>\n<p>transition\u306e\u7a2e\u985e\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n<a href=\"#con2-1\">transition-property<\/a> \uff1a \u5bfe\u8c61\u306e\u30d7\u30ed\u30d1\u30c6\u30a3<br \/>\n<a href=\"#con2-2\">transition-duration<\/a> \uff1a \u304b\u304b\u308b\u6642\u9593<br \/>\n<a href=\"#con2-3\">transition-timing-function<\/a> \uff1a \u901f\u5ea6<br \/>\n<a href=\"#con2-4\">transition-delay<\/a> \uff1a \u4f55\u79d2\u5f8c\u306b\u958b\u59cb\u3059\u308b\u304b\n<\/div>\n<h2 id=\"step3-3\">\u5404\u8a73\u7d30<\/h2>\n<h3 id=\"#con2-1\">transition-property\uff08\u5bfe\u8c61\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/h3>\n<p>trainsition\u306e\u5bfe\u8c61\u3068\u306a\u308bCSS\u306e\u30d7\u30ed\u30d1\u30c6\u30a3<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fball\uff1a\u5168\u30d7\u30ed\u30d1\u30c6\u30a3\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fbnone\uff1a\u3069\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3082\u5909\u5316\u3057\u306a\u3044<br \/>\n\u30fb\u5404\u30d7\u30ed\u30d1\u30c6\u30a3\n<\/div>\n<p>\u6307\u5b9a\u3067\u304d\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u4e00\u89a7<br \/>\n\u203b\u629c\u3051\u304c\u3042\u308c\u3070\u3054\u3081\u3093\u306a\u3055\u3044\u3002\u3053\u3053\u306b\u8a18\u8f09\u304c\u7121\u304f\u3066\u3082\u57fa\u672c\u7684\u306bCSS\u30b9\u30bf\u30a4\u30eb\u306f\u307b\u307c\u6307\u5b9a\u3067\u304d\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fbwidth<br \/>\n\u30fbheight<br \/>\n\u30fbbackground-color<br \/>\n\u30fbbackground-position<br \/>\n\u30fbborder-bottom-color<br \/>\n\u30fbborder-bottom-width<br \/>\n\u30fbborder-left-color<br \/>\n\u30fbborder-left-width<br \/>\n\u30fbborder-right-color<br \/>\n\u30fbborder-right-width<br \/>\n\u30fbborder-spacing<br \/>\n\u30fbborder-top-color<br \/>\n\u30fbborder-top-width<br \/>\n\u30fbbox-shadow<br \/>\n\u30fbclip<br \/>\n\u30fbcolor<br \/>\n\u30fbfont-size<br \/>\n\u30fbfont-weight<br \/>\n\u30fbtop<br \/>\n\u30fbbottom<br \/>\n\u30fbleft<br \/>\n\u30fbright<br \/>\n\u30fbletter-spacing<br \/>\n\u30fbline-height<br \/>\n\u30fbmargin-top<br \/>\n\u30fbmargin-bottom<br \/>\n\u30fbmargin-left<br \/>\n\u30fbmargin-right<br \/>\n\u30fbtext-indent<br \/>\n\u30fbtext-shadow<br \/>\n\u30fbvertical-align<br \/>\n\u30fbvisibility<br \/>\n\u30fbword-spacing<br \/>\n\u30fbz-index\n<\/div>\n<p>\u4e00\u62ec\u6307\u5b9a\uff08\u30b7\u30e7\u30fc\u30c8\u30cf\u30f3\u30c9\uff09\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3 id=\"#con2-2\">transition-duration\uff08\u304b\u304b\u308b\u6642\u9593\uff09<\/h3>\n<p>\u4f55\u79d2\u9593\u3067\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3055\u305b\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fb0s\uff1a\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fb1s\u3084100ms\u306a\u3069\n<\/div>\n<h3 id=\"#con2-3\">transition-timing-function\uff08\u901f\u5ea6\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u901f\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fbease\uff1a\u3086\u3063\u304f\u308a\u59cb\u307e\u3063\u3066\u3001\u3086\u3063\u304f\u308a\u7d42\u308f\u308b\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fbease-in\uff1a\u3086\u3063\u304f\u308a\u59cb\u307e\u308b<br \/>\n\u30fbease-out\uff1a\u3086\u3063\u304f\u308a\u7d42\u308f\u308b<br \/>\n\u30fbease-in-out\uff1aease\u3088\u308a\u3055\u3089\u306b\u3086\u3063\u304f\u308a\u59cb\u307e\u3063\u3066\u3001\u3086\u3063\u304f\u308a\u7d42\u308f\u308b<br \/>\n\u30fblinear\uff1a\u4e00\u5b9a\u306e\u901f\u5ea6\u3067\u59cb\u307e\u3063\u3066\u7d42\u308f\u308b<br \/>\n\u30fbsteps(n)\uff1an\u306e\u56de\u6570\u3060\u3051\u30b3\u30de\u9001\u308a\u3059\u308b\n<\/div>\n<p>\u3053\u3061\u3089\u306esteps\u3082animation\u306esteps\u540c\u69d8\u3001\u30b3\u30de\u64ae\u308a\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u3088\u3046\u306b\u52d5\u304d\u307e\u3059\u3002<\/p>\n<h3 id=\"#con2-4\">transition-delay\uff08\u4f55\u79d2\u5f8c\u306b\u958b\u59cb\u3059\u308b\u304b\uff09<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u3092\u4f55\u79d2\u5f8c\u306b\u958b\u59cb\u3059\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3002<\/p>\n<div style=\"font-size: 90%; background-color: #efefef; padding: 2% 2.5%; border-radius: 10px; line-height: 1.8em;\">\n\u30fb0s\uff1a\uff08\u521d\u671f\u5024\uff09<br \/>\n\u30fb1s\u3084100ms\u306a\u3069\n<\/div>\n<h2 id=\"step3-4\">\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p>\u6570\u7a2e\u985e\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u7528\u610f\u3057\u3066\u307f\u305f\u306e\u3067\u30db\u30d0\u30fc\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u3082\u3057\u4f7f\u7528\u3055\u308c\u308b\u5834\u5408\u306f\u9069\u5f53\u306b\u6570\u5024\u3084\u540d\u524d\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p class=\"codepen\" data-height=\"460\" data-theme-id=\"dark\" data-default-tab=\"result\" data-user=\"otwo\" data-slug-hash=\"vYEgoYw\" style=\"height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\" data-pen-title=\"vYEgoYw\">\n  <span>See the Pen <a href=\"https:\/\/codepen.io\/otwo\/pen\/vYEgoYw\"><br \/>\n  vYEgoYw<\/a> by otwo (<a href=\"https:\/\/codepen.io\/otwo\">@otwo<\/a>)<br \/>\n  on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/span>\n<\/p>\n<p><script async src=\"https:\/\/static.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<h1 id=\"step4\">\u611f\u60f3<\/h1>\n<p>\u4ee5\u4e0a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u4fdd\u5b58\u7248\u307f\u305f\u3044\u306a\u5f62\u3067\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u304a\u5f79\u306b\u7acb\u3061\u305d\u3046\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\n\u81ea\u5206\u81ea\u8eab\u3082\u66f8\u3044\u3066\u3066\u304b\u306a\u308a\u52c9\u5f37\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u4eca\u56de\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u307b\u307cpx\u6307\u5b9a\u3067\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3055\u305b\u3066\u3044\u308b\u306e\u3067\u307e\u3060\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306e\u3053\u3068\u3068\u304b\u3092\u8003\u3048\u308b\u3068\u3082\u3046\u5c11\u3057\u8a18\u8f09\u304c\u9762\u5012\u306b\u306f\u306a\u308a\u307e\u3059\u3002<br \/>\n\u305f\u3060\u899a\u3048\u3066\u4f7f\u3044\u3053\u306a\u305b\u308b\u3088\u3046\u306b\u306a\u308c\u3070\u3001\u304b\u306a\u308a\u91cd\u5b9d\u3067\u304d\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff01<\/p>\n<p>\u305c\u3072\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002 Web\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u5c71\u672c\u3067\u3059\u3002 \u4eca\u56de\u306fCSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e\u3084\u8a73\u7d30\u3001\u4f7f\u3044\u65b9\u306e\u4f8b\u306a\u3069\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\uff01 \u3082\u304f\u3058 CSS\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3068\u306f\uff1f animation \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 \u7a2e\u985e \u5404\u8a73\u7d30 \u30b5\u30f3\u30d7\u30eb trans [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":5064,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[49,103],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/posts\/4945"}],"collection":[{"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/comments?post=4945"}],"version-history":[{"count":138,"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/posts\/4945\/revisions"}],"predecessor-version":[{"id":5193,"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/posts\/4945\/revisions\/5193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/media\/5064"}],"wp:attachment":[{"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/media?parent=4945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/categories?post=4945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.otwo.jp\/blog\/wp-json\/wp\/v2\/tags?post=4945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}