{"id":10785,"date":"2017-10-24T18:59:27","date_gmt":"2017-10-24T14:59:27","guid":{"rendered":"http:\/\/www.idg.net.ua\/blog\/?page_id=10785"},"modified":"2017-10-27T23:55:53","modified_gmt":"2017-10-27T19:55:53","slug":"name-and-duration","status":"publish","type":"page","link":"https:\/\/idg.net.ua\/blog\/uchebnik-css\/ispolzovanie-css\/css3-animation\/name-and-duration","title":{"rendered":"\u0417\u0430\u043f\u0443\u0441\u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438: \u0430nimation-name \u0438 animation-duration"},"content":{"rendered":"<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043a\u0430\u0434\u0440\u044b <code>@keyframes<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 CSS. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0441\u0442\u0438\u043b\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0433\u0440\u0443\u043f\u043f\u044b <em>animation<\/em> \u2014 \u044d\u0442\u043e <code>animation-name<\/code> \u0438 <code>animation-duration<\/code>.<!--more--><\/p>\n<h2>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e animation-name<\/h2>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>animation-name<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043e\u0434\u043d\u0443 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0443\u0440\u043e\u043a\u0435. \u041c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u0435\u0439 \u0438\u043c\u044f <code>changeBackgroundColor<\/code> (\u043e\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u043b\u043e\u0432\u0430 <code>@keyframes<\/code>). \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <code>&lt;div&gt;<\/code> \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c <code>.traffic-light<\/code>, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.traffic-light {\r\n    animation-name: changeBackgroundColor;\r\n}\r\n<\/pre>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0441\u043e\u043e\u0431\u0449\u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443, \u043a\u0430\u043a\u0443\u044e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <code>.traffic-light<\/code>, \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0435 \u0438\u043c\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>animation-name<\/code>. \u041d\u043e \u0447\u0442\u043e\u0431\u044b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430\u0441\u044c, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u0449\u0435 \u0438 \u0435\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h2>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e animation-duration<\/h2>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u043c\u0438 \u0440\u0430\u043d\u0435\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>transition-duration<\/code>. \u041e\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>changeBackgroundColor<\/code>, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u0430\u044f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <code>.traffic-light<\/code>, \u0434\u043b\u0438\u043b\u0430\u0441\u044c 6&nbsp;\u0441\u0435\u043a\u0443\u043d\u0434. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u0441\u0442\u0438\u043b\u044e \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.traffic-light {\r\n    animation-name: changeBackgroundColor;\r\n    animation-duration: 6s;\r\n}\r\n<\/pre>\n<p>\u0420\u044f\u0434\u043e\u043c \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0438\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0422\u0430\u043a, \u043f\u043e\u043b\u043d\u044b\u0439 CSS-\u043a\u043e\u0434 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.traffic-light {\r\n    animation-name: changeBackgroundColor;\r\n    animation-duration: 6s;\r\n    width: 50px;\r\n    height: 50px;\r\n    border-radius: 50%;\r\n    background-color: red;\r\n}\r\n<\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043d\u0430 GIF-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0438\u0436\u0435:<\/p>\n<figure>\n<img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/animation-keyframes.gif\" alt=\"CSS3 animation keyframes\" \/><br \/>\n<\/figure>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439<\/h3>\n<p>\u041a \u043e\u0434\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0435 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 <code>animation-name<\/code>. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u0443\u044e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 (<code>animation-duration<\/code>), \u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u0435 \u0432 \u0442\u0430\u043a\u043e\u043c \u0436\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.traffic-light {\r\n    animation-name: firstAnimation, secondAnimation;\r\n    animation-duration: 3s, 1s;\r\n}\r\n<\/pre>\n<p>\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 <code>animation-name<\/code> \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>firstAnimation<\/code> \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 3&nbsp;\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f <code>secondAnimation<\/code> \u0441 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 1&nbsp;\u0441\u0435\u043a\u0443\u043d\u0434\u0430.<\/p>\n<hr>\n<p class=\"see-also\"><strong>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0435:<\/strong> <a href=\"\/blog\/uchebnik-css\/ispolzovanie-css\/css3-animation\/timing-function-and-delay\" title=\"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 animation-timing-function \u0438 animation-delay\">\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 animation-timing-function \u0438 animation-delay<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043a\u0430\u0434\u0440\u044b @keyframes, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 CSS. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0441\u0442\u0438\u043b\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0433\u0440\u0443\u043f\u043f\u044b <em>animation<\/em> \u2014 \u044d\u0442\u043e animation-name \u0438 animation-duration.<\/p>\n<p><span class=\"more-link\"><a href=\"https:\/\/idg.net.ua\/blog\/uchebnik-css\/ispolzovanie-css\/css3-animation\/name-and-duration\" class=\"more-link\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435<\/a><\/span><\/p>\n","protected":false},"author":6,"featured_media":0,"parent":10774,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/pages\/10785"}],"collection":[{"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/comments?post=10785"}],"version-history":[{"count":9,"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/pages\/10785\/revisions"}],"predecessor-version":[{"id":10824,"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/pages\/10785\/revisions\/10824"}],"up":[{"embeddable":true,"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/pages\/10774"}],"wp:attachment":[{"href":"https:\/\/idg.net.ua\/blog\/wp-json\/wp\/v2\/media?parent=10785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}