{"id":238389,"date":"2023-12-26T06:47:20","date_gmt":"2023-12-25T22:47:20","guid":{"rendered":"https:\/\/www.idc.net\/help\/238389\/"},"modified":"2023-12-26T06:47:20","modified_gmt":"2023-12-25T22:47:20","slug":"css%e5%85%a5%e9%97%a8-animation-timing-function%ef%bc%88%e5%8a%a8%e7%94%bb%e6%97%b6%e9%97%b4%e5%87%bd%e6%95%b0%ef%bc%89","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/238389\/","title":{"rendered":"Css\u5165\u95e8: animation-timing-function\uff08\u52a8\u753b\u65f6\u95f4\u51fd\u6570\uff09"},"content":{"rendered":"<p><title id=\"css%e5%85%a5%e9%97%a8-animation-timing-function%ef%bc%88%e5%8a%a8%e7%94%bb%e6%97%b6%e9%97%b4%e5%87%bd%e6%95%b0%ef%bc%89-KnSRCHbUav\">Css\u5165\u95e8: animation-timing-function\uff08\u52a8\u753b\u65f6\u95f4\u51fd\u6570\uff09<\/title><\/p>\n<h1 id=\"css%e5%85%a5%e9%97%a8-animation-timing-function%ef%bc%88%e5%8a%a8%e7%94%bb%e6%97%b6%e9%97%b4%e5%87%bd%e6%95%b0%ef%bc%89-KnSRCHbUav\">Css\u5165\u95e8: animation-timing-function\uff08\u52a8\u753b\u65f6\u95f4\u51fd\u6570\uff09<\/h1>\n<p>\u5728CSS\u4e2d\uff0c\u52a8\u753b\u662f\u7f51\u9875\u8bbe\u8ba1\u4e2d\u5e38\u7528\u7684\u5143\u7d20\u4e4b\u4e00\u3002\u901a\u8fc7\u4f7f\u7528animation-timing-function\u5c5e\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u63a7\u5236\u52a8\u753b\u7684\u65f6\u95f4\u51fd\u6570\uff0c\u4ece\u800c\u6539\u53d8\u52a8\u753b\u7684\u901f\u5ea6\u548c\u6d41\u7545\u5ea6\u3002<\/p>\n<h2 id=\"%e4%bb%80%e4%b9%88%e6%98%afanimation-timing-function%ef%bc%9f-KnSRCHbUav\">\u4ec0\u4e48\u662fanimation-timing-function\uff1f<\/h2>\n<p>animation-timing-function\u5c5e\u6027\u5b9a\u4e49\u4e86\u52a8\u753b\u7684\u65f6\u95f4\u51fd\u6570\uff0c\u5b83\u51b3\u5b9a\u4e86\u52a8\u753b\u5728\u4e0d\u540c\u65f6\u95f4\u70b9\u7684\u901f\u5ea6\u3002\u901a\u8fc7\u6539\u53d8\u65f6\u95f4\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u51fa\u4e0d\u540c\u7684\u52a8\u753b\u6548\u679c\u3002<\/p>\n<p>animation-timing-function\u5c5e\u6027\u53ef\u4ee5\u63a5\u53d7\u4ee5\u4e0b\u51e0\u79cd\u503c\uff1a<\/p>\n<ul>\n<li><code>ease<\/code>\uff1a\u9ed8\u8ba4\u503c\uff0c\u52a8\u753b\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u6162\uff0c\u4e2d\u95f4\u65f6\u901f\u5ea6\u8f83\u5feb\u3002<\/li>\n<li><code>linear<\/code>\uff1a\u52a8\u753b\u4ece\u5f00\u59cb\u5230\u7ed3\u675f\u7684\u901f\u5ea6\u4fdd\u6301\u6052\u5b9a\u3002<\/li>\n<li><code>ease-in<\/code>\uff1a\u52a8\u753b\u5f00\u59cb\u65f6\u901f\u5ea6\u8f83\u6162\uff0c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u5feb\u3002<\/li>\n<li><code>ease-out<\/code>\uff1a\u52a8\u753b\u5f00\u59cb\u65f6\u901f\u5ea6\u8f83\u5feb\uff0c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u6162\u3002<\/li>\n<li><code>ease-in-out<\/code>\uff1a\u52a8\u753b\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u6162\uff0c\u4e2d\u95f4\u65f6\u901f\u5ea6\u8f83\u5feb\u3002<\/li>\n<li><code>cubic-bezier(n,n,n,n)<\/code>\uff1a\u81ea\u5b9a\u4e49\u65f6\u95f4\u51fd\u6570\uff0c\u901a\u8fc7\u8c03\u6574\u56db\u4e2a\u53c2\u6570\u7684\u503c\uff0c\u53ef\u4ee5\u521b\u5efa\u51fa\u5404\u79cd\u4e0d\u540c\u7684\u65f6\u95f4\u51fd\u6570\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8animation-timing-function%ef%bc%9f-KnSRCHbUav\">\u5982\u4f55\u4f7f\u7528animation-timing-function\uff1f<\/h2>\n<p>\u8981\u4f7f\u7528animation-timing-function\u5c5e\u6027\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5176\u5e94\u7528\u4e8eCSS\u52a8\u753b\u4e2d\u7684\u5173\u952e\u5e27\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<pre><code>&lt;style&gt;\n@keyframes myAnimation {\n  0% { left: 0; }\n  100% { left: 100px; }\n}\n\n#myElement {\n  animation-name: myAnimation;\n  animation-duration: 2s;\n  animation-timing-function: ease-in-out;\n}\n&lt;\/style&gt;\n\n&lt;div id=\"myElement\"&gt;\u8fd9\u662f\u4e00\u4e2a\u52a8\u753b\u5143\u7d20&lt;\/div&gt;\n<\/code><\/pre>\n<p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3amyAnimation\u7684\u5173\u952e\u5e27\u52a8\u753b\uff0c\u5b83\u4ece\u5de6\u8fb9\u79fb\u52a8\u5230\u53f3\u8fb9\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06animation-timing-function\u5c5e\u6027\u8bbe\u7f6e\u4e3aease-in-out\uff0c\u4f7f\u52a8\u753b\u5728\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u6162\uff0c\u4e2d\u95f4\u65f6\u901f\u5ea6\u8f83\u5feb\u3002<\/p>\n<h2 id=\"%e5%b8%b8%e8%a7%81%e7%9a%84animation-timing-function%e7%a4%ba%e4%be%8b-KnSRCHbUav\">\u5e38\u89c1\u7684animation-timing-function\u793a\u4f8b<\/h2>\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u5e38\u89c1\u7684animation-timing-function\u793a\u4f8b\uff1a<\/p>\n<ul>\n<li><strong>ease<\/strong>\uff1a\u52a8\u753b\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u6162\uff0c\u4e2d\u95f4\u65f6\u901f\u5ea6\u8f83\u5feb\u3002<\/li>\n<li><strong>linear<\/strong>\uff1a\u52a8\u753b\u4ece\u5f00\u59cb\u5230\u7ed3\u675f\u7684\u901f\u5ea6\u4fdd\u6301\u6052\u5b9a\u3002<\/li>\n<li><strong>ease-in<\/strong>\uff1a\u52a8\u753b\u5f00\u59cb\u65f6\u901f\u5ea6\u8f83\u6162\uff0c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u5feb\u3002<\/li>\n<li><strong>ease-out<\/strong>\uff1a\u52a8\u753b\u5f00\u59cb\u65f6\u901f\u5ea6\u8f83\u5feb\uff0c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u6162\u3002<\/li>\n<li><strong>ease-in-out<\/strong>\uff1a\u52a8\u753b\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u901f\u5ea6\u8f83\u6162\uff0c\u4e2d\u95f4\u65f6\u901f\u5ea6\u8f83\u5feb\u3002<\/li>\n<li><strong>cubic-bezier(0.1, 0.7, 1.0, 0.1)<\/strong>\uff1a\u81ea\u5b9a\u4e49\u65f6\u95f4\u51fd\u6570\uff0c\u521b\u5efa\u51fa\u4e00\u79cd\u7c7b\u4f3c\u4e8e\u5f39\u7c27\u6548\u679c\u7684\u52a8\u753b\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%80%bb%e7%bb%93-KnSRCHbUav\">\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4f7f\u7528animation-timing-function\u5c5e\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u63a7\u5236CSS\u52a8\u753b\u7684\u65f6\u95f4\u51fd\u6570\uff0c\u4ece\u800c\u6539\u53d8\u52a8\u753b\u7684\u901f\u5ea6\u548c\u6d41\u7545\u5ea6\u3002\u5e38\u89c1\u7684\u65f6\u95f4\u51fd\u6570\u5305\u62ecease\u3001linear\u3001ease-in\u3001ease-out\u3001ease-in-out\u548ccubic-bezier\u3002\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\uff0c\u6211\u4eec\u53ef\u4ee5\u9009\u62e9\u5408\u9002\u7684\u65f6\u95f4\u51fd\u6570\u6765\u521b\u5efa\u51fa\u5404\u79cd\u4e0d\u540c\u7684\u52a8\u753b\u6548\u679c\u3002<\/p>\n<p>\u5982\u679c\u60a8\u60f3\u4e86\u89e3\u66f4\u591a\u5173\u4e8eCSS\u52a8\u753b\u7684\u77e5\u8bc6\uff0c\u53ef\u4ee5\u8bbf\u95ee\u6211\u4eec\u7684\u5b98\u7f51\uff1a<a href=\"https:\/\/idc.net\">https:\/\/idc.net<\/a>\u3002\u6211\u4eec\u63d0\u4f9b\u9999\u6e2f\u670d\u52a1\u5668\u3001\u7f8e\u56fd\u670d\u52a1\u5668\u548c\u4e91\u670d\u52a1\u5668\u7b49\u4ea7\u54c1\uff0c\u9999\u6e2f\u670d\u52a1\u5668\u9996\u9009\u540e\u6d6a\u4e91\uff0c\u6211\u4eec\u8fd8\u63d0\u4f9b10\u5143\u9999\u6e2f\u670d\u52a1\u5668\u548c\u9999\u6e2f\u670d\u52a1\u5668\u514d\u8d39\u8bd5\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Css\u5165\u95e8: animation-timing-function\uff08\u52a8\u753b\u65f6\u95f4\u51fd\u6570\uff09 Css\u5165\u95e8: animati [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[197854],"tags":[],"class_list":["post-238389","post","type-post","status-publish","format-standard","hentry","category-html"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/238389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=238389"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/238389\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=238389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=238389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=238389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}