{"id":2499,"date":"2012-07-17T18:29:22","date_gmt":"2012-07-17T10:29:22","guid":{"rendered":"http:\/\/www.zhangxinxu.com\/wordpress\/?p=2499"},"modified":"2019-05-24T15:35:50","modified_gmt":"2019-05-24T07:35:50","slug":"codepen-jsfiddle","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2012\/07\/codepen-jsfiddle\/","title":{"rendered":"\u89c1\u591a\u8bc6\u5e7f\uff1aCodePen\u9879\u76ee\u7f51\u7ad9\u7b80\u4ecb"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/\">https:\/\/www.zhangxinxu.com<\/a><br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=2499\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=2499<\/a><\/p>\n<h3>\u4e00\u3001CodePen\u662f\u5e72\u561b\u7684\uff1f<\/h3>\n<p><a href=\"https:\/\/codepen.io\/\">CodePen<sup>click for visit!<\/sup><\/a>\u987e\u540d\u601d\u610f\uff0ccode+pen, \u5373\u201c\u4ee3\u7801\u7b14\u201d\uff0c\u5176\u5bd3\u610f\u7c7b\u4f3c\u4e2d\u56fd\u53e4\u4ee3\u6545\u4e8b\u201c\u795e\u7b14\u9a6c\u826f\u201d\u4e2d\u7684\u90a3\u4e2a\u201c\u795e\u7b14\u201d\uff0c\u4e0d\u8fc7\uff0c\u8fd9\u91cc\u7684\u201c\u7b14\u201d\u662f\u5199\u4ee3\u7801\u7684\u201c\u795e\u7b14\u201d\u3002\u8c8c\u4f3c\u8bf4\u5f97\u6709\u4e9b\u7384\u4e4e\u4e86\uff0c\u8bf4\u7a7f\u4e86\uff0cCodePen\u5c31\u662f\u7528\u6765\u5236\u4f5c\u6d4b\u8bd5\u9875\u9762\u7684\u7f51\u7ad9\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u80fd\u719f\u6089\u6216\u8005\u81f3\u5c11\u89c1\u8fc7\u7c7b\u4f3c\u7684\u7f51\u7ad9\u9879\u76ee\uff0c\u5982<a href=\"https:\/\/jsfiddle.net\/\">jsfiddle<\/a>. \u4f8b\u5982\u4e0b\u9762\u8fd9\u4e2a\u5f88\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u4f9d\u7136\u662f\u5343\u5e74\u4e0d\u53d8\u7684\u5f20\u5c0f\u59d0\uff1a<br \/>\n<iframe style=\"width: 550px; height: 200px\" src=\"https:\/\/jsfiddle.net\/gggL7\/1\/embedded\/\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\"><\/iframe><\/p>\n<p>\u5982\u679cjsfiddle\u88ab\u5899\u6389\u4e86\uff0c\u65e0\u6cd5\u67e5\u770b\u6548\u679c\u7684\u53ef\u4ee5\u59d4\u66f2\u6c42\u5168\u67e5\u770b\u4e0b\u9762\u7684\u622a\u56fe\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"jsFiddle\u5e94\u7528\u5c0f\u6548\u679c\u622a\u56fe \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_112922.png\" title=\"jsFiddle\u5e94\u7528\u5c0f\u6548\u679c\u622a\u56fe\" class=\"alignnone\" width=\"588\" height=\"297\" \/><\/p>\n<p>\u4e0d\u53ef\u5426\u8ba4\uff0cCodePen\u786e\u5b9e\u501f\u9274\u4e86jsFiddle\u7684\u90e8\u5206\u7075\u611f\uff0c\u4f46\u662f\uff0cCodePen\u672c\u8eab\u7684\u521b\u65b0\u4ee5\u53ca\u5192\u9669\u53ef\u4ee5\u8ba9\u8fd9\u90e8\u5206\u501f\u9274\u5ffd\u7565\u4e0d\u8ba1\u3002<\/p>\n<p><strong>CodePen\u4e0ejsFiddle<\/strong><br \/>\njsFiddle\u57fa\u672c\u4e0a\u5c31\u662f\u7eaf\u788e\u7684demo\u5c55\u793a\u4e0e\u5206\u4eab\uff0c\u5176\u5f3a\u8c03\u5b9e\u73b0\uff0c\u56e0\u6b64\u6709\u66f4\u591a\u53ef\u4f9b\u9009\u62e9\u7684JS\u6846\u67b6\uff08\u5305\u62ec\u5404\u4e2a\u7248\u672c\uff09\uff0c\u5982\u4e0b\u622a\u56fe\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_114654.png\" title=\"jsFiddle\u7684JS\u6846\u67b6\u5217\u8868\u4eec\" class=\"alignnone\" width=\"218\" height=\"256\" \/><\/p>\n<p>\u800cCodePen\u53ea\u63d0\u4f9b\u6700\u65b0\u7248\u672c\u7684jQuery, MooTools, Prototype\u6846\u67b6\uff0c\u4e14\u9ed8\u8ba4\u4e0d\u4f7f\u7528\u4efb\u4f55\u5e93\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\u6700\u65b0\u7248\u672c\u5e93\uff0c\u9ed8\u8ba4\u4e0d\u4f7f\u7528\u4efb\u4f55\u5e93CodePen \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_142540.png\" title=\"\u6700\u65b0\u7248\u672c\u5e93\uff0c\u9ed8\u8ba4\u4e0d\u4f7f\u7528\u4efb\u4f55\u5e93CodePen\" class=\"alignnone\" width=\"197\" height=\"202\" \/><\/p>\n<p>jsFiddle\u5199\u4ee3\u7801\u7684\u6548\u679c\u8981\u624b\u52a8\u70b9\u51fb<code>Run<\/code>\u624d\u80fd\u770b\u5230\uff0cCodePen\u6240\u89c1\u5373\u6240\u5f97\u3002<\/p>\n<p>jsFiddle\u7684\u8d26\u6237\u7cfb\u7edf\uff08\u767b\u5f55\u6ce8\u518c\u7b49\uff09\u5c5e\u4e8e\u81ea\u5df1\uff0cCodePen\u4f3c\u4e4e\u9700\u8981\u7684\u662fGitHub\u8d26\u53f7\u3002<\/p>\n<p>CodePen\u6240\u505a\u7684\u53e6\u5916\u7684\u5de5\u4f5c\u662f\u4f18\u79c0\u524d\u7aefdemo\u7684\u5c55\u793a\u3002\u6211\u4eec\u8fdb\u5165\u5176<a href=\"https:\/\/codepen.io\/\">\u9996\u9875<\/a>\u5c31\u53ef\u4ee5\u770b\u5230\u5f88\u591a\u7cbe\u6e5b\u7684\u524d\u7aefdemo\u6548\u679c\uff0c\u9ed8\u8ba4\u662f\u7f16\u8f91\u4eba\u5de5\u9009\u62e9\u7f6e\u9876\u63a8\u8350\u7684\u3002\u6211\u6253\u5f00\u9996\u9875\u7684\u8fd9\u4e2a\u65f6\u5019\uff0c\u7b2c\u4e00\u4e2ademo\u662f<a href=\"https:\/\/codepen.io\/leison\/pen\/KeAJa\">\u52a8\u611f\u8f6c\u5708\u5708\u7684\u70ab\u9177\u6548\u679cdemo<\/a>\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"CodePen\u4e0a\u5708\u5708\u65cb\u8f6c\u70ab\u9177\u622a\u56fe \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_150008.png\" title=\"CodePen\u4e0a\u5708\u5708\u65cb\u8f6c\u70ab\u9177\u622a\u56fe\" class=\"alignnone\" width=\"403\" height=\"376\" \/><\/p>\n<p>\u7ad9\u70b9\u73b0\u6709\u4e0a\u767e\u4e2a\u7cbe\u9009\u6548\u679c\uff0c\u4e0a\u5343\u4e2a\u5404\u7c7b\u524d\u7aefdemo\u6548\u679c\u3002\u60a8\u53ef\u4ee5\u4ece\u4e2d\u83b7\u5f97\u5f88\u591a<strong>\u524d\u7aef\u4ea4\u4e92\u7684\u7075\u611f<\/strong>\uff0c\u5f53\u7136\uff0c\u5176\u4e2d\u7684\u6280\u672f\u5b9e\u73b0\u4e5f\u53ef\u4ee5\u4e00\u5e76\u5b66\u4e60\uff01\u8fd9\u5c31\u662f\u6211\u4ecb\u7ecdCodePen\u9879\u76ee\u6700\u4e3b\u8981\u539f\u56e0\u2014\u2014you can get, not only share!<\/p>\n<h3>\u4e8c\u3001CodePen\u7684demo\u5236\u4f5c\u754c\u9762\u719f\u6089<\/h3>\n<p>\u4e0b\u9762\u7b80\u5355\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528CodePen\u8fd9\u4e2a\u5e73\u53f0\u5236\u4f5c\u53ef\u5206\u4eab\u7684demo\u9875\u9762\u3002<\/p>\n<p>\u9996\u9875\uff0c\u5de6\u4e0a\u89d2\uff0c\u8fd8\u7b97\u6bd4\u8f83\u660e\u663e\u7684\uff0c\u521b\u5efa\u65b0Pen\u7684\u6309\u94ae\uff0c\u70b9\u51fb\u4e4b\uff0c\u5373\u8fdb\u5165\u521b\u5efa\u9875\u9762\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"CodePen\u521b\u5efa\u65b0Pen\u7684\u6309\u94ae\u622a\u56fe\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_152536.png\" title=\"CodePen\u521b\u5efa\u65b0Pen\u7684\u6309\u94ae\u622a\u56fe\" class=\"alignnone\" width=\"278\" height=\"140\" \/><\/p>\n<p>\u76f8\u6bd4jsFiddle, CodePen\u7684\u754c\u9762\u66f4\u7b80\u6d01\uff0c\u76ee\u7684\u66f4\u660e\u786e\u3002\u4e0a\u9762\u4f9d\u6b21HTML, CSS, JS\u4e09\u4e2a\u6a21\u5757\uff0c\u4e0b\u9762\u767d\u8272\u533a\u57df\u4e3a\u6548\u679c\u533a\uff0c\u6548\u679c\u6240\u89c1\u5373\u6240\u5f97\u3002\u6bd4\u65b9\u8bf4\uff0c\u6211\u4eec\u952e\u5165\u4e00\u884c\u56fe\u7247\u7684HTML\u4ee3\u7801\uff08\u81ea\u52a8\u9ad8\u4eae\uff09\uff0c\u7136\u540e\uff0c\u5f20\u5c0f\u59d0\u7684\u56fe\u7247\u5c31\u663e\u793a\u51fa\u6765\u4e86\uff0c\u5982\u4e0b\u622a\u56fe\u7f29\u7565\u56fe\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"CodePen\u6700\u7b80\u5355\u7684\u4ee3\u7801\uff0c\u6240\u89c1\u6240\u5f97\u793a\u4f8b \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_153926.png\" title=\"CodePen\u6700\u7b80\u5355\u7684\u4ee3\u7801\uff0c\u6240\u89c1\u6240\u5f97\u793a\u4f8b\" class=\"alignnone\" width=\"564\" height=\"298\" \/><\/p>\n<p>\u70b9\u51fb\u53f3\u4e0b\u89d2\u7684keyboard\u6309\u94ae\u53ef\u4ee5\u67e5\u770b\u5feb\u6377\u952e\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_154233.png\" title=\"\u5feb\u6377\u952e\u6309\u94ae\" class=\"alignnone\" width=\"111\" height=\"76\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"CodePen\u521b\u5efa\u9875\u9762\u5feb\u6377\u952e\u5185\u5bb9 \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_154634.png\" title=\"CodePen\u521b\u5efa\u9875\u9762\u5feb\u6377\u952e\u5185\u5bb9\" class=\"alignleft\" width=\"493\" height=\"528\" \/><\/p>\n<p>\u4e2d\u6587\u6574\u7406\u5982\u4e0b\uff1a<br \/>\n<strong>\u5f39\u6846<\/strong>\uff08\u6307\u8fd9\u4e2a\u5feb\u6377\u952e\u5f39\u6846\uff09\uff1a<br \/>\n<span style=\"color:#cd0000;\">Ctrl+9<\/span> &nbsp; &nbsp; \u6253\u5f00<br \/>\n<span style=\"color:#cd0000;\">ESC<\/span> &nbsp; &nbsp; \u5173\u95ed<\/p>\n<p><strong>\u7f16\u8f91\u6307\u4ee4<\/strong>\uff1a<br \/>\n<span style=\"color:#cd0000;\">Ctrl+1<\/span> &nbsp; &nbsp; \u6269\u5c55HTML\u9762\u677f\uff08\u5373\u6c34\u5e73100%\u663e\u793a\uff0c\u800c\u975e\u9ed8\u8ba4\u76841\/3\u663e\u793a\uff09<br \/>\n<span style=\"color:#cd0000;\">Ctrl+2<\/span> &nbsp; &nbsp; \u6269\u5c55CSS\u9762\u677f<br \/>\n<span style=\"color:#cd0000;\">Ctrl+3<\/span> &nbsp; &nbsp; \u6269\u5c55JS\u9762\u677f<\/p>\n<p><span style=\"color:#cd0000;\">Ctrl+4<\/span> &nbsp; &nbsp; \u542f\u7528JS Hint\u68c0\u67e5<\/p>\n<p><span style=\"color:#cd0000;\">ESC<\/span> &nbsp; &nbsp; \u4e0a\u9762\u6240\u6709\u64a4\u9500<\/p>\n<p><strong>Pen\u6307\u4ee4<\/strong>\uff1a<br \/>\n<span style=\"color:#cd0000;\">Ctrl+S<\/span> &nbsp; &nbsp; \u4fdd\u5b58<\/p>\n<p><span style=\"color:#cd0000;\">Ctrl+F<\/span> &nbsp; &nbsp; \u5b50\u8fdb\u7a0b<br \/>\n<span style=\"color:#cd0000;\">Ctrl+U<\/span> &nbsp; &nbsp; \u66f4\u65b0<br \/>\n<span style=\"color:#cd0000;\">Ctrl+Y<\/span> &nbsp; &nbsp; \u8be6\u60c5<\/p>\n<p><span style=\"color:#cd0000;\">Ctrl+P<\/span> &nbsp; &nbsp; \u65b0\u7684Pen<\/p>\n<p><strong>\u5206\u4eab\u6307\u4ee4<\/strong>\uff1a<br \/>\n<span style=\"color:#cd0000;\">Ctrl+G<\/span> &nbsp; &nbsp; \u4fdd\u5b58\u4e3aGitHub Gist<br \/>\n<span style=\"color:#cd0000;\">Ctrl+O<\/span> &nbsp; &nbsp; \u6253\u5f00\u5168\u5c4f\u7ed3\u679c<\/p>\n<p>\u4ee5\u4e0a\u5feb\u6377\u952e\u53ef\u80fd\u4f1a\u4e0e\u6d4f\u89c8\u5668\u7684\u5feb\u6377\u952e\u51b2\u7a81\u3002\u6bd4\u5982\u8bf4\u7b2c\u4e00\u4e2a<code>Ctrl+9<\/code>, \u6211\u6309\u4e0b\u540e\u65f6\u6253\u5f00\u6700\u540e\u4e00\u4e2a\u6d4f\u89c8\u5668\u9009\u9879\u5361\uff0c\u800c\u4e0d\u662f\u6253\u5f00\u5feb\u6377\u952e\u5f39\u6846\u3002<\/p>\n<div style=\"clear:both;\"><strong>\u5404\u4e2a\u9762\u677f\u7684\u8bbe\u7f6e<\/strong><\/div>\n<p>\u6bcf\u4e2a\u9762\u677f\u53f3\u4e0a\u89d2\u7684\u9f7f\u8f6e\u56fe\u6807\u5bf9\u4e8e\u672c\u9762\u677f\u76f8\u5173\u7684\u4e00\u4e9b\u8bbe\u7f6e\uff0c\u6240\u5e94\u7528\u7684\u5f80\u5f80\u662f\u5f53\u4e0b\u6bd4\u8f83\u6d41\u884c\u7684\u6280\u672f\uff0c\u9879\u76ee\u7b49\u3002\u5982HTML\u9762\u677f\uff0c\u5c31\u662f\u4e0b\u56fe\u6240\u793a\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"HTML\u9762\u677f\u8bbe\u7f6e\u5185\u5bb9\u622a\u56fe \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_161158.png\" title=\"HTML\u9762\u677f\u8bbe\u7f6e\u5185\u5bb9\u622a\u56fe\" class=\"alignnone\" width=\"426\" height=\"245\" \/><\/p>\n<p>\u5176\u4e2d\uff1a<a href=\"http:\/\/haml-lang.com\/\">Haml<\/a>\u662f\u4e00\u79cd\u7528\u6765\u63cf\u8ff0\u4efb\u4f55XHTML web document\u7684\u6807\u8bb0\u8bed\u8a00\uff0c\u662f\u4e00\u4e2axhtml\u7684\u62bd\u8c61\u63cf\u8ff0\uff0c\u5185\u90e8\u4f7f\u7528\u4e00\u4e9bcode\u6765\u751f\u6210\u52a8\u6001\u5185\u5bb9\u3002Haml \u662f\u4e00\u79cd\u7b80\u6d01\u4f18\u7f8e\u7684\u6a21\u677f\u8bed\u8a00\uff0c\u53ef\u4ee5\u5e94\u7528\u4e8eRuby on Rails\u3001 PHP\u7b49Web\u5f00\u53d1\u5e73\u53f0\uff0c\u53ef\u4ee5\u5927\u5927\u7f29\u51cf\u6a21\u677f\u4ee3\u7801\uff0c\u51cf\u5c11\u5197\u4f59\uff0c\u63d0\u9ad8\u53ef\u8bfb\u6027\u3002<br \/>\n<a href=\"http:\/\/daringfireball.net\/projects\/markdown\/\">Markdown<\/a>\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u6807\u8bb0\u8bed\u8a00\uff0c\u7531John Gruber\u548cAaron Swartz\u521b\u5efa\uff0c\u4f7f\u5176\u6210\u4e3a\u53ef\u8bfb\u6027\u6700\u5927\u5e76\u53ef\u518d\u53d1\u884c\u7684\u53ef\u8f93\u5165\u8f93\u51fa\u7684\u683c\u5f0f\u3002\u8fd9\u79cd\u8bed\u8a00\u521b\u5efa\u7075\u611f\u6765\u81ea\u4e8e\u5df2\u7ecf\u5b58\u5728\u7684\u5e26\u6807\u8bb0\u7684\u7535\u5b50\u90ae\u4ef6\u6587\u672c\u3002Markdown\u5141\u8bb8 HTML\u8bed\u6cd5, \u6240\u4ee5\u4f7f\u7528\u8005\u5982\u679c\u9700\u8981\u53ef\u4ee5\u76f4\u63a5\u7528 HTML\u6765\u8868\u793a\u662f\u53ef\u4ee5\u7684\u3002<br \/>\n<a href=\"http:\/\/slim-lang.com\/\">slim<\/a>\u662f\u4e3aRuby\u521b\u5efa\u7684\u5feb\u901f\u7684\u8f7b\u91cf\u7ea7\u7684\u6a21\u677f\u5f15\u64ce\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"Slim\u7684\u4ee3\u7801\u5c55\u793a \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_162729.png\" title=\"Slim\u7684\u4ee3\u7801\u5c55\u793a\" class=\"alignnone\" width=\"469\" height=\"318\" \/><\/p>\n<p>CSS\u9762\u677f\u5982\u4e0b\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"CSS\u9762\u677f\u8bbe\u7f6e\u7684\u754c\u9762\u622a\u56fe \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_163005.png\" title=\"CSS\u9762\u677f\u8bbe\u7f6e\u7684\u754c\u9762\u622a\u56fe\" class=\"alignnone\" width=\"402\" height=\"297\" \/><\/p>\n<p>LESS, SASS\u7b49\u4e45\u4e0d\u591a\u8bf4\u4e86\uff0c\u5927\u5bb6\u90fd\u6bd4\u8f83\u719f\u6089\u3002\u4e0a\u56fe\u8fd8\u6709\u6570\u4e2a\u5355\u9009\u591a\u9009\u9879\u5927\u5bb6\u53ef\u4ee5\u7559\u610f\u4e0b\u3002<br \/>\n<a href=\"https:\/\/necolas.github.com\/normalize.css\/\">Normalize<\/a>\u5b9e\u9645\u4e4b<a href=\"https:\/\/raw.github.com\/necolas\/normalize.css\/master\/normalize.css\">normalize.css<\/a>, \u4e0d\u540c\u4e8e\u8fc7\u65f6\u7684CSS reset, \u8fd9\u91cc\u7684\u4e00\u4e9b\u8bbe\u7f6e\u66f4\u7406\u6027\uff0c\u4f8b\u5982\uff0ch1~6\u6807\u7b7e\u7684\u7c97\u4f53\u4fdd\u7559\uff0c\u9ed8\u8ba4<code>margin<\/code>\u4fdd\u7559\uff0c\u6240\u505a\u7684\u4ec5\u4ec5\u53ea\u6d4f\u89c8\u5668\u517c\u5bb9\u6027\u7edf\u4e00\u3002<\/p>\n<p><a href=\"http:\/\/leaverou.github.com\/prefixfree\/\">Prefix free<\/a>\u6211<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2011\/11\/css3-prefixfree-js-animatable\/\">\u4e4b\u524d<\/a>\u597d\u50cf\u63d0\u5230\u8fc7\uff0c\u987e\u540d\u601d\u610f\uff0c\u5199CSS3\u4e0d\u9700\u8981\u79c1\u6709\u524d\u7f00\u4eec\u4e86\u3002<\/p>\n<p>JS\u9762\u677f\u5982\u4e0b\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\" CodePen JS\u9762\u677f\u622a\u56fe \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_163719.png\" title=\" CodePen JS\u9762\u677f\u622a\u56fe\" class=\"alignnone\" width=\"416\" height=\"296\" \/><\/p>\n<p>\u5176\u4e2d\u2014\u2014<br \/>\nCoffeeScript\u6709\u6570\u5e74\u7684\u5386\u53f2\u4e86\uff0c<a href=\"https:\/\/coffeescript.org\/\">CoffeeScript<\/a>\u5c06JavaScript\u786c\u7ed1\u7684C\/Java\u8bed\u6cd5\u629b\u5f03\u4e86\uff1b\u6539\u4e3a\u91c7\u7528\u7c7b\u4f3cRuby\/Python\u7684\u8bed\u6cd5\u3002\u7c7b\u4f3c\u4e0b\u9762\u4e66\u5199\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre># Assignment:\r\nnumber   = 42\r\nopposite = true\r\n\r\n# Conditions:\r\nnumber = -42 if opposite\r\n\r\n# Functions:\r\nsquare = (x) -> x * x\r\n\r\n...<\/pre>\n<\/div>\n<p><a href=\"http:\/\/modernizr.com\/\">Modernizr<\/a>\u662f\u4e00\u4e2a\u68c0\u6d4b\u6d4f\u89c8\u5668\u5bf9HTML5\u548cCSS3\u7279\u6027\u652f\u6301\u7684JS\u5e93\u3002\u5f88\u65e9\u7684\u65f6\u5019\u5c31\u88ab\u83ab\u540d\u5176\u5999\u5899\u6389\u4e86\uff01<\/p>\n<h3>\u4e09\u3001CodePen\u4e0e\u6587\u5b57\u73af\u7ed5\u6548\u679c<\/h3>\n<p>\u6211\u4eec\u4e0b\u9762\u6f14\u793a\u5982\u4f55\u5229\u7528CodePen\u5b9e\u73b0\u6587\u5b57\u73af\u7ed5\u6548\u679c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u56fe\u7247\u7684\u6587\u5b57\u73af\u7ed5\u6548\u679c\u56fe \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_175427.png\" title=\"\u56fe\u7247\u7684\u6587\u5b57\u73af\u7ed5\u6548\u679c\u56fe\" class=\"alignnone\" width=\"172\" height=\"149\" \/><\/p>\n<p>\u9996\u5148HTML\uff0c\u6ca1\u4ec0\u4e48\u597d\u8bf4\u7684\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>&lt;div class=\"zhanghanyun\">\r\n  &lt;img src=\"mm1.jpg\" \/>\r\n  &lt;p>\u65e0\u7248\u6743\u5e74\u8f7b\u65f6\u5019&lt;\/p>\r\n&lt;\/div><\/pre>\n<\/div>\n<p>JS\u90e8\u5206\uff0c\u6587\u5b57\u73af\u7ed5\u8fd9\u79cd\u6fc0\u8fdb\u7684\u6392\u7248\u6548\u679c\uff0c\u663e\u7136\u9700\u8981\u501f\u52a9\u4e00\u4e9b\u5c0f\u63d2\u4ef6\u5bf9\u6587\u5b57\u8fdb\u884c\u5904\u7406\u3002<a href=\"http:\/\/letteringjs.com\/\">lettering.js<\/a>\u636e\u8bf4\u662f2010\u5e7410\u4f73jQuery\u63d2\u4ef6\uff0c\u8f85\u52a9\u5b9e\u73b0CSS\u6587\u5b57\u6392\u7248\uff0c\u5176\u4ee3\u7801\uff08\u975e\u538b\u7f29\uff09\u4e5f\u5c0f\u4e8e2K, \u5f88\u5c0f\u3002\u5176\u505a\u7684\u5de5\u4f5c\u5f88\u7b80\u5355\uff0c\u6240\u6709\u6587\u5b57\u5916\u9762\u5957\u4e00\u4e2a\u5e8f\u5217\u5316\u7684\u6807\u7b7e\uff08\u7c7b\u540d\u89c4\u5f8b\u4e3a<code>char1<\/code>, <code>char2<\/code>, <code>char3<\/code>, \u2026\u2026\uff09\uff0c\u65b9\u4fbfCSS\u8fdb\u884c\u63a7\u5236\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u6253\u5f00JS\u7684\u9762\u677f\uff0c\u9009\u62e9jQuery\u63d2\u4ef6\uff0c\u540c\u65f6\u8c03\u7528<a href=\"https:\/\/www.zhangxinxu.com\/study\/js\/jquery.lettering.js\">lettering.js<\/a>\u6587\u4ef6\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"CodePen\u5b9e\u73b0\u6587\u5b57\u73af\u7ed5\u6548\u679c\u4e4bJS\u9762\u677f\u7684\u8bbe\u7f6e \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_180136.png\" title=\"CodePen\u5b9e\u73b0\u6587\u5b57\u73af\u7ed5\u6548\u679c\u4e4bJS\u9762\u677f\u7684\u8bbe\u7f6e\" class=\"alignnone\" width=\"386\" height=\"163\" \/><\/p>\n<p>\u4e0b\u9762\u53ea\u8981\u5bf9CSS\u8fdb\u884c\u5904\u7406\u5c31\u53ef\u4ee5\u4e86\uff0c\u5bf9\u4e8e<code>char1<\/code>, <code>char2<\/code>, <code>char3<\/code>, <code>\u2026\u2026<\/code>\u5177\u6709\u5faa\u73af\u6027\u8d28\u7684\u7c7b\u540d\u8fdb\u884c\u6837\u5f0f\u63a7\u5236\uff0cSASS\u7b49\u4f18\u52bf\u7684\u4e66\u5199\u4f18\u52bf\u5c31\u4f3c\u4e4e\u4f53\u73b0\u51fa\u6765\u4e86\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u6253\u5f00CSS\u9762\u677f\uff0c\u9009\u62e9SASS\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\" CodePen\u9009\u62e9CSS\u9762\u677f\u4e2d\u7684SASS  \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201207\/2012-07-17_180518.png\" title=\" CodePen\u9009\u62e9CSS\u9762\u677f\u4e2d\u7684SASS \" class=\"alignnone\" width=\"243\" height=\"173\" \/><\/p>\n<p>CSS\u7f16\u8f91\u6846\u4e2d\uff0c\u6700\u6700\u6838\u5fc3\u4e5f\u662f\u96be\u70b9\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>@for $i from -3 through 3 \r\n  .char#{$i+4} \r\n    +transform(translate(0, (-1*$i*$i+px)) rotate((-6*$i)+deg))<\/pre>\n<\/div>\n<p><code>$i<\/code>\u4e3a\u8fb9\u6846\uff0c<code>#{}<\/code>\u8868\u793a\u6570\u503c\uff0c<code>+transform<\/code>\u524d\u9762\u7684\u52a0\u53f7<code>+<\/code>\u8868\u524d\u7f00\u517c\u5bb9\u3002<\/p>\n<p>\u4e8e\u662f\uff0c\u5c31\u6709\u6211\u4eec\u6240\u8981\u7684\u6548\u679c\u4e86\u3002\u60a8\u53ef\u4ee5<a href=\"https:\/\/codepen.io\/anon\/pen\/cmzfj\">\u70b9\u51fb\u8fd9\u91cc\u67e5\u770b<\/a>\u3002<\/p>\n<p>\u6216\u8005\uff0c\u76f4\u63a5\u4e0b\u9762\u7684\u6548\u679c\uff1a<\/p>\n<pre class=\"codepen\" data-type=\"result\" data-href=\"cmzfj\" data-user=\"anon\" data-host=\"https:\/\/codepen.io\"><code><\/code><\/pre>\n<p><script async src=\"https:\/\/codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>\u5173\u4e8e\u56fe\u7247\u73af\u7ed5\u5b9e\u73b0\u4ee5\u53ca\u539f\u7406\uff0c\u6211\u8fd9\u91cc\u7684\u5b9e\u73b0\u5e76\u4e0d\u662f\u5f88\u6b63\u7edf\u3002\u60a8\u8981\u662f\u5bf9\u76f8\u5173\u6548\u679c\u6709\u5174\u8da3\uff0c\u53ef\u4ee5\u67e5\u770b\u8fd9\u7bc7\u6587\u7ae0\uff1a<a href=\"https:\/\/css-tricks.com\/set-text-on-a-circle\/\">Set Text on a Circle<\/a>, \u5176\u4e2d\u6709\u8be6\u7ec6\u7684\u539f\u7406\u793a\u610f\u3002<\/p>\n<p>\u6211\u8fd9\u91cc\u6548\u679c\u5b9e\u73b0\u67d0\u4e9b\u7075\u611f\u5c31\u53c2\u8003\u81ea\u4e0a\u6587\u3002<\/p>\n<p>\u6700\u540e\u7684\u6700\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u6216\u94fe\u63a5\uff0c\u6216\u76f4\u63a5\u6548\u679c\u7684\u5f62\u5f0f\u8fdb\u884c\u5206\u4eab\u4f20\u64ad\u4e86\uff01<\/p>\n<h3>\u56db\u3001\u7ed3\u8bed<\/h3>\n<p>CodePen\u7684\u610f\u4e49\u5728\u4f55\u5904\uff1f<\/p>\n<p>\u6211\u60f3\u5230\u4e86\u8fd9\u4e48\u51e0\u70b9\uff1a<br \/>\n1. \u4ed6\u4eba\u5947\u601d\u5999\u60f3\u7684\u6548\u679c\uff0c\u63d0\u4f9b\u4e86\u4ea4\u4e92\u7075\u611f\u6e90\u6cc9<br \/>\n2. \u4ed6\u4eba\u7cbe\u6e5b\u6548\u679c\u5b9e\u73b0\uff0c\u4e3a\u81ea\u5df1\u7684\u5b66\u4e60\u63d0\u4f9b\u53c2\u8003<br \/>\n3. \u652f\u6301\u6d41\u884c\u6280\u672f\uff0c\u5982SASS, \u6211\u4eec\u53ef\u4ee5\u65e0\u9700\u81ea\u5efa\u5e73\u53f0\uff0c\u5229\u7528CodePen\u8fdb\u884c\u5feb\u901f\u5b66\u4e60<br \/>\n4. \u60f3\u4ed6\u4eba\u8bf7\u6559\u95ee\u9898\uff0c\u5229\u7528CodePen\u5236\u4f5c\u95ee\u9898demo\uff0c\u6709\u52a9\u4e8e\u95ee\u9898\u5feb\u901f\u89e3\u51b3<br \/>\n5. \u57f9\u517b\u4e50\u4e8e\u5206\u4eab\uff0c\u5f00\u6e90\u7b49\u79ef\u6781\u7684\u4f20\u64ad\u7cbe\u795e<br \/>\n6. \u6709\u52a9\u4e8e\u6574\u4f53\u524d\u7aef\u6280\u672f\u7684\u53d1\u5c55\u4e0e\u8fdb\u6b65<\/p>\n<p>\u7b49\u2026\u2026<\/p>\n<p>\u541b\u82e5\u6709\u9700\uff0c\u5f53\u53d6\u81ea\u9700\uff1b\u541b\u82e5\u65e0\u9700\uff0c\u4ea6\u77e5\u5176\u9700\uff01<\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u6765\u81ea<a href=\"http:\/\/www.zhangxinxu.com\/\">\u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b<\/a>[<a href=\"http:\/\/www.zhangxinxu.com\/\">http:\/\/www.zhangxinxu.com<\/a>]<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=2499\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=2499<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u5185\u5bb9\u5982\u9898\u6240\u793a\uff0c\u4ecb\u7ecdCodePen\u8fd9\u4e2a\u7f51\u7ad9\uff0cCodePen\u67d0\u4e9b\u5730\u65b9\u4e0ejsfiddle\u662f\u6bd4\u8f83\u7c7b\u4f3c\u7684\uff0c\u4f46\u662f\u8fd8\u662f\u6709\u4e0d\u5c11\u4e0d\u4e00\u6837\u7684\u5730\u65b9\u3002\u672c\u6587\u5c31\u4ecb\u7ecd\u5176\u4e2d\u7684\u5f02\u540c\u3002\u6700\u540e\uff0c\u5e76\u4ee5\u5b9e\u4f8b\u5c55\u793aCodePen\u7684\u4f7f\u7528\u3002\u672c\u6587\u6709\u5927\u91cf\u622a\u56fe\uff0c\u4ee5\u4fbf\u8868\u8ff0\u51c6\u786e\u6613\u7406\u89e3\u3002\u603b\u4e4b\uff0c\u5e0c\u671b\u672c\u6587\u7684\u5185\u5bb9\u80fd\u591f\u5bf9\u60a8\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[734,736,735,737,617,654,484],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/2499"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2499"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/2499\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}