{"id":30110,"date":"2024-11-25T08:55:29","date_gmt":"2024-11-25T00:55:29","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30110\/"},"modified":"2024-11-25T08:55:29","modified_gmt":"2024-11-25T00:55:29","slug":"%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e7%99%bb%e5%bd%95%e9%a1%b5%ef%bc%9acss%e5%ae%9e%e7%8e%b0%e5%8a%a8%e7%94%bb%e4%ba%91%e5%b1%82%e6%bc%82%e6%b5%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30110\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e"},"content":{"rendered":"<h1>\u524d\u8a00<\/h1>\n<p>2017\u5e74\u524d\u7aef\u706b\u4e86\uff0c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u3001weex\u3001reactnative\uff0c\u5c31\u8fde\u652f\u4ed8\u5b9d\u4e5f\u641e\u8d77\u4e86\u5c0f\u7a0b\u5e8f\uff0c\u603b\u611f\u89c9\u8fd9\u662f\u539f\u751f\u8981\u6bc1\u706d\u7684\u8282\u594f\u554a\uff0c\u6211\u4e5f\u4e58\u70ed\u4e0a\u8f66\u4e07\u4e00\u6ce2\u3002<\/p>\n<h1>\u4e0a\u6548\u679c\u56fe(GI\u52a8\u6001\u56fe)<\/h1>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/164\/63d7b390cd5b14bbc04a406af3d45e86-0.gif\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e\u63d2\u56fe\" \/><\/p>\n<p>\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u52a8\u753b<\/p>\n<p>\u5f53\u6211\u770b\u5230\u8fd9\u5f20\u80cc\u666f\u56fe\u7684\u65f6\u5019\uff0c\u5f3a\u8feb\u75c7\u7acb\u9a6c\u6765\u4e86\uff0c\u8fd9\u4e91\u6735\u4e3a\u4ec0\u4e48\u4e0d\u52a8\uff0c\u4e8e\u662f\u5f00\u59cb\u4e86\u4e00\u6ce2\u6298\u817e\u3002<\/p>\n<h1>\u77e5\u8bc6\u70b9<\/h1>\n<h2>\u8ba4\u8bc6animation<\/h2>\n<p>animation \u5c5e\u6027\u662f\u4e00\u4e2a\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u8bbe\u7f6e\u516d\u4e2a\u52a8\u753b\u5c5e\u6027\uff1a<br \/>\u503c &nbsp; &nbsp;\u63cf\u8ff0<br \/>animation-name &nbsp; &nbsp;\u89c4\u5b9a\u9700\u8981\u7ed1\u5b9a\u5230\u9009\u62e9\u5668\u7684 keyframe \u540d\u79f0\u3002\u3002<br \/>animation-duration &nbsp; &nbsp;\u89c4\u5b9a\u5b8c\u6210\u52a8\u753b\u6240\u82b1\u8d39\u7684\u65f6\u95f4\uff0c\u4ee5\u79d2\u6216\u6beb\u79d2\u8ba1\u3002<br \/>animation-timing-function &nbsp; &nbsp;\u89c4\u5b9a\u52a8\u753b\u7684\u901f\u5ea6\u66f2\u7ebf\u3002<br \/>animation-delay &nbsp; &nbsp;\u89c4\u5b9a\u5728\u52a8\u753b\u5f00\u59cb\u4e4b\u524d\u7684\u5ef6\u8fdf\u3002<br \/>animation-iteration-count &nbsp; &nbsp;\u89c4\u5b9a\u52a8\u753b\u5e94\u8be5\u64ad\u653e\u7684\u6b21\u6570\u3002<br \/>animation-direction &nbsp; &nbsp;\u89c4\u5b9a\u662f\u5426\u5e94\u8be5\u8f6e\u6d41\u53cd\u5411\u64ad\u653e\u52a8\u753b\u3002<\/p>\n<h2>\u8ba4\u8bc6translate<\/h2>\n<p>\u65b9\u6cd5\u7279\u522b\u591a\uff0c\u672c\u6587\u4e3b\u8981\u75282\u4e2a\u3002<\/p>\n<ul>\n<li>\n<p>translate3d(x,y,z)\u5b9a\u4e49 3D \u7f29\u653e\u8f6c\u6362\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<\/li>\n<li>\n<p>rotate3d(x,y,z,angle) &nbsp; &nbsp;\u5b9a\u4e49 3D \u65cb\u8f6c\u3002<\/p>\n<\/li>\n<\/ul>\n<p>translate3d(1,1,0)<br \/>\u4f60\u53ef\u4ee5\u7406\u89e3\u4e3a\uff08\u5de6\u53f3\uff0c\u4e0a\u4e0b\uff0c\u5927\u5c0f\uff09\u53d8\u5316\u3002<br \/>rotate3d(1,1,0,45deg)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/164\/63d7b390cd5b14bbc04a406af3d45e86-1.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e\u63d2\u56fe1\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e\u63d2\u56fe1\" \/><\/p>\n<p>rotate3d<\/p>\n<h1>\u5b9e\u73b0<\/h1>\n<p>1.\u4e24\u6735\u4e91\u9664\u4e86\u5927\u5c0f\u548c\u521d\u59cb\u4f4d\u7f6e\u4e0d\u901a\uff0c\u5176\u4ed6\u90fd\u76f8\u540c\u3002<\/p>\n<pre>.cloud {\r\n  position: absolute;\r\n  z-index: 3;\r\n  width:99px;height:64px; top: 0; \r\n  right: 0;\r\n  bottom: 0;\r\n  animation: cloud 5s linear infinite;\r\n}\r\n\r\n@keyframes cloud {\r\n  from {\r\n    transform: translate3d(-125rpx, 0, 0);\r\n  }\r\n\r\n  to {\r\n    transform: translate3d(180rpx, 0, 0);\r\n  }\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2drpx\u662f\u5fae\u4fe1\u7279\u6709\u7684\u5c5e\u6027\uff0c\u4e0d\u53d7\u5c4f\u5e55\u5927\u5c0f\u7684\u5f71\u54cd\uff0c\u7c7b\u4f3c\u4e8e\u5b89\u5353\u91cc\u7684dp\u5355\u4f4d\u3002keyframes\u662f\u5300\u901f\u79fb\u52a8\uff0c\u4ececss\u91cc\u53ef\u4ee5\u770b\u5230\u53ea\u6539\u53d8\u4e86\u5de6\u53f3\u65b9\u5411\u3002<br \/>2.\u5934\u50cf\u672c\u6765\u60f3\u52a0\u4e2a\u540a\u7bee\uff0c\u50cf\u8361\u79cb\u5343\u4e00\u6837\u7684\u8361\u6f3e\uff0c\u4f46\u662f\u6ca1\u6709\u6210\u529f\uff0c\u53ea\u662f\u968f\u4fbf\u641e\u4e86\u4e2a\u98d8\u6765\u98d8\u53bb\u7684\u52a8\u753b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/164\/16b5a376dd5ec0edbc8e09d22a6ba69e-2.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e\u63d2\u56fe2\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e\u63d2\u56fe2\" \/><\/p>\n<p>\u4ee3\u7801\u5982\u4e0b<\/p>\n<pre>@keyframes pic {\r\n  0% {\r\n    transform: translate3d(0, 20rpx, 0) rotate(-15deg);\r\n  }\r\n  15% {\r\n    transform: translate3d(0, 0rpx, 0) rotate(25deg);\r\n  }\r\n  36% {\r\n    transform: translate3d(0, -20rpx, 0) rotate(-20deg);\r\n  }\r\n  50% {\r\n    transform: translate3d(0, -10rpx, 0) rotate(15deg);\r\n  }\r\n  68% {\r\n    transform: translate3d(0, 10rpx, 0) rotate(-25deg);\r\n  }\r\n  85% {\r\n    transform: translate3d(0, 15rpx, 0) rotate(15deg);\r\n  }\r\n  100% {\r\n    transform: translate3d(0, 20rpx, 0) rotate(-15deg);\r\n  }\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6ca1\u60f3\u5230keyframes\u4e0d\u4ec5\u6709\u652f\u6301from to\u8fd8\u652f\u6301\u767e\u5206\u6bd4\uff0c\u4e0d\u9519\u3002\u8fd9\u91cc\uff0c\u53ea\u8981\u63a7\u5236\u597d\u5c42\u7ea7\u5173\u7cfb\u3001\u52a8\u753b\u65f6\u957f\u3001\u900f\u660e\u5ea6\u5373\u53ef\u5b9e\u73b0\u4e91\u5c42\u6f02\u6d6e\u3002<\/p>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u4e0d\u5f97\u4e0d\u8bf4css\u8fd8\u662f\u6709\u5f88\u591a\u52a8\u753b\u7684\uff0c\u4e5f\u6709\u5f88\u591a\u7279\u6548\uff0c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u91cc\u52a0\u4e00\u70b9\u52a8\u753b\uff0c\u80fd\u4f7f\u9875\u9762\u7a0d\u5fae\u7f8e\u89c2\u70b9\u3002\u5f53\u7136\uff0c\u590d\u6742\u70b9\u7684\u52a8\u753b\uff0c\u53ea\u80fd\u6709\u673a\u4f1a\u518d\u66f4\u65b0\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u767b\u5f55\u9875\uff1aCSS\u5b9e\u73b0\u52a8\u753b\u4e91\u5c42\u6f02\u6d6e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 2017\u5e74\u524d\u7aef\u706b\u4e86\uff0c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u3001weex\u3001reactnative\uff0c\u5c31\u8fde\u652f\u4ed8\u5b9d\u4e5f\u641e\u8d77\u4e86\u5c0f\u7a0b\u5e8f\uff0c\u603b\u611f\u89c9\u8fd9\u662f\u539f\u751f\u8981\u6bc1\u706d\u7684\u8282\u594f\u554a\uff0c\u6211\u4e5f\u4e58\u70ed\u4e0a\u8f66\u4e07\u4e00\u6ce2\u3002 \u4e0a\u6548\u679c\u56fe(GI\u52a8\u6001\u56fe) \u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u52a8\u753b \u5f53\u6211\u770b\u5230\u8fd9\u5f20\u80cc\u666f\u56fe\u7684\u65f6\u5019\uff0c\u5f3a\u8feb\u75c7\u7acb\u9a6c\u6765\u4e86\uff0c\u8fd9\u4e91\u6735\u4e3a\u4ec0\u4e48\u4e0d\u52a8\uff0c\u4e8e\u662f\u5f00\u59cb\u4e86\u4e00\u6ce2\u6298\u817e\u3002 \u77e5\u8bc6\u70b9 \u8ba4\u8bc6animation animation \u5c5e\u6027\u662f\u4e00\u4e2a\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u8bbe\u7f6e\u516d\u4e2a\u52a8\u753b\u5c5e\u6027\uff1a\u503c &nbsp; &nbsp;\u63cf\u8ff0animation-name &nbsp; &nbsp;\u89c4\u5b9a\u9700\u8981\u7ed1\u5b9a\u5230\u9009\u62e9\u5668\u7684 keyframe \u540d\u79f0\u3002\u3002animation-duration &nbsp; &nbsp;\u89c4\u5b9a\u5b8c\u6210\u52a8\u753b\u6240\u82b1\u8d39\u7684\u65f6\u95f4\uff0c\u4ee5\u79d2\u6216\u6beb\u79d2\u8ba1\u3002animation-timing-function &nbsp; &nbsp;\u89c4\u5b9a\u52a8\u753b\u7684\u901f\u5ea6\u66f2\u7ebf\u3002animation-delay &nbsp; &nbsp;\u89c4\u5b9a\u5728\u52a8\u753b\u5f00\u59cb\u4e4b\u524d\u7684\u5ef6\u8fdf\u3002animation-iteration-count &nbsp; &nbsp;\u89c4\u5b9a\u52a8\u753b\u5e94\u8be5\u64ad\u653e\u7684\u6b21\u6570\u3002animation-direction &nbsp; &nbsp;\u89c4\u5b9a\u662f\u5426\u5e94\u8be5\u8f6e\u6d41\u53cd\u5411\u64ad\u653e\u52a8\u753b\u3002 \u8ba4\u8bc6translate \u65b9\u6cd5\u7279\u522b\u591a\uff0c\u672c\u6587\u4e3b\u8981\u75282\u4e2a\u3002 translate3d(x,y,z)\u5b9a\u4e49 3D \u7f29\u653e\u8f6c\u6362\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b rotate3d(x,y,z,angle) &nbsp; &nbsp;\u5b9a\u4e49 3D \u65cb\u8f6c\u3002 translate3d(1,1,0)\u4f60\u53ef\u4ee5\u7406\u89e3\u4e3a\uff08\u5de6\u53f3\uff0c\u4e0a\u4e0b\uff0c\u5927\u5c0f\uff09\u53d8\u5316\u3002rotate3d(1,1,0,45deg) rotate3d \u5b9e\u73b0 1.\u4e24\u6735\u4e91\u9664\u4e86\u5927\u5c0f\u548c\u521d\u59cb\u4f4d\u7f6e\u4e0d\u901a\uff0c\u5176\u4ed6\u90fd\u76f8\u540c\u3002 .cloud { position: absolute; z-index: 3; width:99px;height:64px; top: 0; right: 0; bottom: 0; animation: cloud [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-30110","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=30110"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30110\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}