{"id":70,"date":"2021-07-30T14:43:20","date_gmt":"2021-07-30T06:43:20","guid":{"rendered":"http:\/\/blog.nonot.cn\/?p=70"},"modified":"2024-07-08T13:13:01","modified_gmt":"2024-07-08T05:13:01","slug":"cssjs-%e5%ae%9e%e7%8e%b0%e6%96%87%e5%ad%97%e6%89%93%e5%8d%b0%e8%be%93%e5%87%ba","status":"publish","type":"post","link":"https:\/\/blog.nonot.cn\/index.php\/2021\/07\/30\/cssjs-%e5%ae%9e%e7%8e%b0%e6%96%87%e5%ad%97%e6%89%93%e5%8d%b0%e8%be%93%e5%87%ba\/","title":{"rendered":"css+js \u5b9e\u73b0\u6587\u5b57\u6253\u5370\u8f93\u51fa"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>&lt;style>\n#test{animation:change 10s linear 0s infinite;font-size:30px;font-weight:700;}\n@keyframes change{0%   {color:#333;}25%{color:#ff0;}50%{color:#f60;}75%{color:#cf0;}100% {color:#f00;}}\n&lt;\/style>\n&lt;div id=\"test\" >\u8fd9\u91cc\u662f\u5185\u5bb9&lt;\/div>\n\n&lt;pre id=\"aa\">&lt;\/pre>\n\n&lt;div style=\"display:none\" id=\"w\">\u5b9e\u73b0\u7c7b\u4f3c\n\n&lt;\/div>\n\n&lt;script language=\"javascript\">\nvar index=0;\n\nvar word=document.getElementById(\"w\").innerHTML;\n\n\nfunction type(){\n\nif(index>3)index=0;\ndocument.getElementById(\"aa\").innerText = word.substring(0,index++);\n\n}\nsetInterval(type, 500);\n\n&lt;\/script><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,3],"tags":[],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-htmlcss","category-javascript"],"_links":{"self":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":1,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":1283,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/posts\/70\/revisions\/1283"}],"wp:attachment":[{"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nonot.cn\/index.php\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}