{"id":1001,"date":"2022-07-09T19:43:00","date_gmt":"2022-07-09T11:43:00","guid":{"rendered":"http:\/\/blog.xrhoujie.com\/?p=1001"},"modified":"2022-06-21T11:01:24","modified_gmt":"2022-06-21T03:01:24","slug":"css3%e5%ae%9e%e7%8e%b0%e9%9b%aa%e7%a2%a7%e5%9b%be%e5%b8%a7%e5%8a%a8%e7%94%bb%e8%bd%ac","status":"publish","type":"post","link":"http:\/\/blog.xrhoujie.com\/?p=1001","title":{"rendered":"css3\u5b9e\u73b0\u96ea\u78a7\u56fe\u5e27\u52a8\u753b(\u8f6c-\u5b8c\u5584\uff09"},"content":{"rendered":"\n<p>\u4ece\u7f51\u4e0a\u67e5\u5230\u4e86\u76f8\u5173\u8d44\u6599\uff0c\u8f6c\u8fc7\u6765\u7814\u7a76\u5b66\u4e60\u4e00\u4e0b\uff0c<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u80cc\u666f\uff1a<br>\u6b64\u9700\u6c42\u662f\u5728html\u754c\u9762\u5b9e\u73b0\uff0c\u7eaf\u539f\u751f\uff0c\u6ca1\u6709\u50cfvue\u751f\u547d\u5468\u671f\u90a3\u4e9b\u4e1c\u897f\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u573a\u666f\uff1a<br>\u4e00\u4e2a\u5355\u7eaf\u7684\u56fe\u7247\u80cc\u666f\uff0c\u60f3\u8981\u5728\u4e0a\u9762\u52a0\u4e2a\u52a8\u56fe\u3002\u4e00\u77ac\u95f4\u8111\u5b50\u91cc\u60f3\u5230\u4e24\u4e2a\u65b9\u6848\uff1a<br>\u4e00\uff1a\u6700\u7701\u524d\u7aef\u529f\u592b\u7684\uff1aui\u538b\u7f29\u4e00\u4e2agif\u56fe\u51fa\u6765<br>\u4e8c\uff1a\u9700\u8981\u524d\u7aef\u5199\u70b9\u4ee3\u7801\u7684\uff1a\u628aui\u63d0\u4f9b\u7684\u591a\u5f20\u56fe\u7247\uff0c\u5229\u7528css3\u52a8\u753b\uff0c\u8fdb\u884c\u52a8\u753b\u5207\u6362\uff0c\u8fbe\u5230\u52a8\u56fe\u7684\u6548\u679c<\/strong><\/p>\n\n\n\n<p>\u60c5\u51b5\u4e00\uff1aui\u538b\u7f29\u51fa\u7684gif\u51fa\u73b0\u767d\u8fb9\u7684\u95ee\u9898\uff0c\u5c31\u4e0d\u592a\u597d\u770b\uff0c\u800c\u4e14ui\u5df2\u7ecf\u5c3d\u529b\u4e86\u3002\u3002\u3002<br>\u6548\u679c\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img src=\"https:\/\/img-blog.csdnimg.cn\/1ee00c5f1df643afa95204e4f2d141d6.png?x-oss-process=image\/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAX-Wwj-mDkeacieeCueWbsOS6hg==,size_12,color_FFFFFF,t_70,g_se,x_16\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u60c5\u51b5\u4e8c\uff1a\u4f7f\u7528css3\u52a8\u753b\u5c5e\u6027\uff0c\u4e5f\u53d1\u73b0\u4e86\u4e0d\u9002\u7528\u7684\u95ee\u9898\uff1a<br>\u6548\u679c\u56fe\uff1a\u622a\u56fe\u4e0d\u80fd\u5c55\u793a\u95ee\u9898<\/p>\n\n\n\n<p><strong>\u8001\u8001\u5b9e\u5b9e\u4f7f\u7528css3.keyframe\u548canimation\u6765\u5b9e\u73b0\uff0c\u8fd9\u91cc\u4e5f\u53d1\u73b0\u4e86\u95ee\u9898\uff0c\u56fe\u7247\u591f\u5c0f\uff0c\u5373\u4f7f\u9884\u5148\u5728head\u52a0\u8f7d\u4e86\u56fe\u7247\uff0c\u4f46\u662f\u6ca1\u6709\u6dfb\u52a0\u5230body\u4e2d\uff0c\u53ef\u4ee5\u5728network\u770b\u5230\u56fe\u7247\u52a0\u8f7d\u6210\u529f\uff0c\u7136\u540e\u5728\u52a8\u753b\u91cc\u4f7f\u7528\u5ef6\u8fdf\uff0c\u5728qq\u3001\u8c37\u6b4c\u5747\u53ef\u4ee5\u6b63\u5e38\u52a0\u8f7d\uff0c\u552f\u72ec\u5728\u8c37\u6b4c\u51fa\u73b0\u4f9d\u65e7\u51fa\u73b0\u95ea\u70c1\u3002<br>\u57fa\u4e8e\u6b64\u4e24\u79cd\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n\n\n\n<p>1\uff1a\u5728head\u4e2d\u5199\u4e00\u4e2ajs\uff0c\u5176\u76ee\u7684\u662f\uff0c\u5feb\u4e8e\u9875\u9762\u52a0\u8f7d\uff0c\u5c31\u751f\u6210img\u6807\u7b7e\uff0c\u8d4b\u503c\u56fe\u7247\u8def\u5f84\uff0cappend\u5230\u9875\u9762\u3002<br>\u95f4\u63a5\u5b9e\u73b0\u56fe\u7247\u9884\u5148\u52a0\u8f7d\uff0c\u800c\u540e\u8fdb\u884ccss3\u5e27\u52a8\u753b\uff0c\u5f53\u7136\u4f60\u7684\u9875\u9762\u4e0d\u9700\u8981\u7528\u5230\u4ed6\uff0c\u4f60\u53ef\u4ee5\u9690\u85cf\u6389\u3002\uff08\u6b64\u65b9\u6848\u4e0d\u592a\u4f18\u96c5\uff0c\u4f46\u80fd\u6210\u4e8b\uff09<\/p>\n\n\n\n<p>\u56fe\u7247\u5f62\u5f0f\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img src=\"https:\/\/img-blog.csdnimg.cn\/352a0f92cfe2455689a64069a119d048.png?x-oss-process=image\/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAX-Wwj-mDkeacieeCueWbsOS6hg==,size_20,color_FFFFFF,t_70,g_se,x_16\" alt=\"\"\/><\/figure>\n\n\n\n<p>js:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for(var i = 0;i&lt;10;i++){\n  var img = new Image()\n  img.onload = await function () {}.bind(this)\n  img.src='\/static\/img\/'+i+'_03.png'\n  document.body.append(img)\n}\n\n.frame-logo .lo-wrap .img-bg{\n  width: 440px;\n  height: 424px;\n  display: flex;\n  position: absolute;\n  top: 3vh;\n  left: 9vw;\n  background: url('\/static\/img\/frame1\/1_03.png');\n  background-size:cover;\n  animation: identifier_p 2s infinite;\n}\n@keyframes identifier_p {\n  0% {\n    background: url('\/static\/img\/frame1\/1_03.png');\n  }\n  7% {\n    background: url('\/static\/img\/frame1\/2_03.png');\n  }\n  14% {\n    background: url('\/static\/img\/frame1\/3_03.png');\n  }\n  21% {\n    background: url('\/static\/img\/frame1\/4_03.png');\n  }\n  28% {\n    background: url('\/static\/img\/frame1\/5_03.png');\n  }\n  35% {\n    background: url('\/static\/img\/frame1\/6_03.png');\n  }\n  42% {\n    background: url('\/static\/img\/frame1\/7_03.png');\n  }\n  49% {\n    background: url('\/static\/img\/frame1\/8_03.png');\n  }\n  56% {\n    background: url('\/static\/img\/frame1\/9_03.png');\n  }\n  63% {\n    background: url('\/static\/img\/frame1\/10_03.png');\n  }\n  70% {\n    background: url('\/static\/img\/frame1\/11_03.png');\n  }\n  77% {\n    background: url('\/static\/img\/frame1\/12_03.png');\n  }\n  84% {\n    background: url('\/static\/img\/frame1\/13_03.png');\n  }\n  91% {\n    background: url('\/static\/img\/frame1\/14_03.png');\n  }\n  98% {\n    background: url('\/static\/img\/frame1\/14_03.png');\n  }\n  100% {\n    background: url('\/static\/img\/frame1\/1_03.png');\n  }\n}\n<\/code><\/pre>\n\n\n\n<p><br>2\uff1a\u4f7f\u7528\u96ea\u78a7\u56fe\u8fdb\u884c\u5b9e\u73b0\uff0c\u5c06\u591a\u5f20\u5e27\u7684\u56fe\uff0c\u5408\u6210\u96ea\u78a7\u56fe\uff0c\u7136\u540e\u6539\u53d8\u4f4d\u7f6e\u8fdb\u884c\u5b9e\u73b0\u3002<br>animation: identifier_p 2s steps(1, start) infinite;\u8fd9\u884c\u4ee3\u7801\u4e2d\u7684steps(1, start)\u662f\u5b9e\u73b0\u7684\u5173\u952e\uff0c\u5982\u679c\u6ca1\u6709\u4ed6\uff0c\u8fd9\u4e2a\u52a8\u753b\u76f8\u5f53\u53ef\u6015\uff0c\u7b49\u540c\u4e8e\u770b\u4e00\u5f20\u4e0d\u505c\u7684\u6539\u53d8\u5b9a\u4f4d\u7684\u80cc\u666f\u56fe\u3002\u6709\u4e86\u4ed6\u624d\u80fd\u771f\u6b63\u79f0\u4e3a\u662f\u201c\u5e27\u52a8\u753b\u201d\uff0c\u53ef\u4ee5\u8bf4\u662f\u76f8\u5f53\u4e1d\u6ed1\u4e86\uff0c\u6bd4gif\u4f53\u9a8c\u597d\u591a\u4e86\u3002<\/p>\n\n\n\n<p>\u56fe\u7247\u5f62\u5f0f\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img src=\"https:\/\/img-blog.csdnimg.cn\/877c90406ebc4973a6a94aeb597d8407.png?x-oss-process=image\/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAX-Wwj-mDkeacieeCueWbsOS6hg==,size_13,color_FFFFFF,t_70,g_se,x_16\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img src=\"https:\/\/img-blog.csdnimg.cn\/aacc335c374e4d7a9f1b9269ba3529d9.png?x-oss-process=image\/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAX-Wwj-mDkeacieeCueWbsOS6hg==,size_13,color_FFFFFF,t_70,g_se,x_16\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img src=\"https:\/\/img-blog.csdnimg.cn\/c01283d31c644f50b880067370ce7510.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>css\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.frame-logo .lo-wrap .img-bg{\n  width: 440px;\n  height: 424px;\n  display: flex;\n  position: absolute;\n  top: 3vh;\n  left: 9vw;\n  background: url('\/static\/img\/test\/css_sprites.png');\n  background-size:cover;\n  animation: identifier_p 2s  steps(1, start) infinite;\n\/\/steps:(number,star\/end) \n}\n\n@keyframes identifier_p {\n  0% {\n  background: url('\/static\/img\/test\/css_sprites.png') -10px -10px;\n  }\n  7% {\n  background: url('\/static\/img\/test\/css_sprites.png') -488px -10px;\n  }\n  14% {\n  background: url('\/static\/img\/test\/css_sprites.png') -10px -474px;\n  }\n  21% {\n  background: url('\/static\/img\/test\/css_sprites.png') -488px -474px;\n  }\n  28% {\n  background: url('\/static\/img\/test\/css_sprites.png') -966px -10px;\n  }\n  35% {\n  background: url('\/static\/img\/test\/css_sprites.png') -966px -474px;\n  }\n  42% {\n  background: url('\/static\/img\/test\/css_sprites.png') -10px -938px;\n  }\n  49% {\n  background: url('\/static\/img\/test\/css_sprites.png')  -488px -938px;\n  }\n  56% {\n  background: url('\/static\/img\/test\/css_sprites.png') -966px -938px;\n  }\n  63% {\n    background: url('\/static\/img\/test\/css_sprites.png') -1444px -10px;\n  }\n  70% {\n    background: url('\/static\/img\/test\/css_sprites.png') -1444px -474px;\n  }\n  77% {\n    background: url('\/static\/img\/test\/css_sprites.png') -1444px -938px;\n  }\n  84% {\n    background: url('\/static\/img\/test\/css_sprites.png')  -10px -1402px;\n  }\n  91% {\n    background: url('\/static\/img\/test\/css_sprites.png') -488px -1402px;\n  }\n  98% {\n    background: url('\/static\/img\/test\/css_sprites.png') -10px -1402px;\n  }\n  100% {\n  background: url('\/static\/img\/test\/css_sprites.png') -488px -1402px;\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\u539f\u6587\u5730\u5740 \uff1ahttps:\/\/blog.csdn.net\/qq_44706619\/article\/details\/121426057<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u8865\u5145 \uff1a<\/strong><\/p>\n\n\n\n<p><strong>Steps(&lt;number_of_steps&gt;\uff0c&lt;direction&gt;)<\/strong><\/p>\n\n\n\n<p>\u65b9\u5411\u4e3a\u201dstart\u201d\u8868\u793a\u4e00\u4e2a\u5de6&#8211;\u6301\u7eed\u51fd\u6570\uff0c\u5728\u52a8\u753b\u5f00\u59cb\u65f6\uff0c\u52a8\u753b\u7684\u7b2c\u4e00\u6bb5\u5c06\u4f1a\u9a6c\u4e0a\u5b8c\u6210\u3002\u4ee5\u5de6\u4fa7\u7aef\u70b9\u4e3a\u8d77\u70b9\uff0c\u7acb\u5373\u8df3\u5230\u7b2c\u4e00\u4e2astep\u7684\u7ed3\u5c3e\u5904\u3002\u5b83\u4f1a\u7acb\u5373\u8df3\u5230\u7b2c\u4e00\u6bb5\u7684\u7ed3\u675f\u5e76\u4e14\u4fdd\u6301\u8fd9\u6837\u7684\u72b6\u6001\u76f4\u5230\u7b2c\u4e00\u6b65\u7684\u6301\u7eed\u65f6\u95f4\u7ed3\u675f\u3002\u540e\u9762\u7684\u6bcf\u4e00\u5e27\u90fd\u5c06\u6309\u7167\u6b64\u6a21\u5f0f\u6765\u5b8c\u6210\u52a8\u753b\u3002<\/p>\n\n\n\n<p>\u65b9\u5411\u4e3a\u201dend\u201d\u8868\u793a\u4e00\u4e2a\u53f3&#8211;\u6301\u7eed\u51fd\u6570\u3002\u52a8\u753b\u6267\u884c\u65f6\uff0c\u5728\u6bcf\u4e00\u5e27\u91cc\uff0c\u52a8\u753b\u4fdd\u6301\u5f53\u524d\u72b6\u6001\u76f4\u5230\u8fd9\u4e00\u6bb5\u7684\u6301\u7eed\u65f6\u95f4\u5b8c\u6210\uff0c\u624d\u4f1a\u8df3\u5230\u4e0b\u4e00\u6b65\u7684\u8d77\u70b9\uff0c\u540e\u9762\u7684\u6bcf\u4e00\u5e27\u90fd\u6309\u7167\u8fd9\u4e2a\u6a21\u5f0f\u6765\u8fdb\u884c\uff0c\u5728\u6700\u540e\u4e00\u5e27\u7684\u8d77\u70b9\uff0c\u7b49\u5230\u8fd9\u4e00\u5e27\u7684\u6301\u7eed\u65f6\u95f4\u7ed3\u675f\uff0c\u6574\u4e2a\u52a8\u753b\u7684\u6267\u884c\u4e5f\u5df2\u7ecf\u7ed3\u675f\uff0c\u6267\u884c\u52a8\u753b\u7684\u5143\u7d20\u6765\u4e0d\u53ca\u8df3\u5230\u8fd9\u4e00\u5e27\u7684\u7ec8\u70b9\uff0c\u76f4\u63a5\u56de\u5230\u4e86\u6574\u4e2a\u52a8\u753b\u8d77\u70b9\uff0c\u5f00\u59cb\u4e86\u7b2c\u4e8c\u6b21\u52a8\u753b\u3002\u6bcf\u4e2a\u9009\u62e9\u672c\u8d28\u4e0a\u4ece\u4e00\u4e2a\u4e0d\u540c\u7684\u9762\u79fb\u52a8\u8fd9\u4e2a\u5143\u7d20\u5e76\u4e14\u5c06\u4ea7\u751f\u4e00\u4e2a\u4e0d\u540c\u7684\u4f4d\u7f6e\u5728\u8fd9\u4e2a\u76f8\u540c\u7684\u52a8\u753b\u91cc\u3002<br>\u8fd9\u9762\u662f\u793a\u4f8b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"498\" height=\"249\" src=\"http:\/\/blog.xrhoujie.com\/wp-content\/uploads\/2022\/06\/2585018924-57eb89a3df558_fix732.webp\" alt=\"\" class=\"wp-image-1014\" srcset=\"http:\/\/blog.xrhoujie.com\/wp-content\/uploads\/2022\/06\/2585018924-57eb89a3df558_fix732.webp 498w, http:\/\/blog.xrhoujie.com\/wp-content\/uploads\/2022\/06\/2585018924-57eb89a3df558_fix732-300x150.webp 300w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"900\" height=\"300\" src=\"http:\/\/blog.xrhoujie.com\/wp-content\/uploads\/2022\/06\/3949005326-57ec7d2e67e8d.webp\" alt=\"\" class=\"wp-image-1015\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u7f51\u4e0a\u67e5\u5230\u4e86\u76f8\u5173\u8d44\u6599\uff0c\u8f6c\u8fc7\u6765\u7814\u7a76\u5b66\u4e60\u4e00\u4e0b\uff0c \u80cc\u666f\uff1a\u6b64\u9700\u6c42\u662f\u5728html\u754c\u9762\u5b9e\u73b0\uff0c\u7eaf\u539f\u751f\uff0c\u6ca1\u6709\u50cfvue\u751f\u547d\u5468\u671f\u90a3\u4e9b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[19],"_links":{"self":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/1001"}],"collection":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1001"}],"version-history":[{"count":3,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/1001\/revisions"}],"predecessor-version":[{"id":1016,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/1001\/revisions\/1016"}],"wp:attachment":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}