{"id":2761,"date":"2014-02-27T16:08:17","date_gmt":"2014-02-27T08:08:17","guid":{"rendered":"https:\/\/sdeno.com\/?p=2761"},"modified":"2014-02-27T16:08:17","modified_gmt":"2014-02-27T08:08:17","slug":"%e4%b8%aa%e4%ba%ba%e6%80%bb%e7%bb%93%e5%89%8d%e7%ab%af%e5%bc%80%e5%8f%91%e8%a7%84%e8%8c%83","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=2761","title":{"rendered":"\u4e2a\u4eba\u603b\u7ed3\u524d\u7aef\u5f00\u53d1\u89c4\u8303"},"content":{"rendered":"<h2>\u901a\u7528\u7ea6\u5b9a<\/h2>\n<h3>\u6587\u4ef6\u4e0e\u76ee\u5f55\u547d\u540d<\/h3>\n<ul>\n<li>\u4e00\u5f8b\u5c0f\u5199, \u5fc5\u987b\u662f\u82f1\u6587\u5355\u8bcd\u6216\u4ea7\u54c1\u540d\u79f0\u7684\u62fc\u97f3, \u591a\u4e2a\u5355\u8bcd\u7528\u8fde\u5b57\u7b26(-)\u8fde\u63a5. \u53ea\u80fd\u51fa\u73b0\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u8fde\u5b57\u7b26, \u4e25\u7981\u51fa\u73b0\u4e2d\u6587.<\/li>\n<li>\u8be5\u547d\u540d\u89c4\u8303\u9002\u7528\u4e8e html, css, js, swf, php, xml, png, gif, jpg, ico \u7b49\u524d\u7aef\u7ef4\u62a4\u7684\u6240\u6709\u6587\u4ef6\u7c7b\u578b\u548c\u76f8\u5173\u76ee\u5f55.<\/li>\n<li>js \u548c css \u538b\u7f29\u6587\u4ef6, \u7edf\u4e00\u4ee5 -min \u7ed3\u5c3e, \u6bd4\u5982\u6e90\u7801\u6587\u4ef6\u4e3a kissy.js, \u538b\u7f29\u540e\u4e3a kissy-min.js .\u538b\u7f29\u4e4b\u524d\u7684\u6587\u4ef6\u4f7f\u7528 \u2013src \u7ed3\u5c3e\u3002<\/li>\n<li>\u8c03\u6574\u81ea\u5df1\u7684\u7f16\u8f91\u5668tab\u5236\u8868\u7b26\u4e00\u7387\u91c7\u75284\u4e2a\u7a7a\u683c<\/li>\n<\/ul>\n<h3>\u524d\u7aef\u5de5\u7a0b\u6587\u4ef6\u7ec4\u7ec7<\/h3>\n<figure class=\"mdx-lazyload-container\" style=\"\"><div style=\"padding-top:50%\"><\/div><div class=\"mdx-img-loading-sp mdui-valign\"><div><div class=\"mdui-spinner\"><\/div><\/div><\/div><img class=\"lazyload\" title=\"\u4e2a\u4eba\u603b\u7ed3\u524d\u7aef\u5f00\u53d1\u89c4\u8303\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"http:\/\/m2.img.libdd.com\/farm2\/180\/7693E7456D3CF46A2C03FC1A1B3323B4_805_1342.JPEG\" alt=\"http:\/\/m2.img.libdd.com\/farm2\/180\/7693E7456D3CF46A2C03FC1A1B3323B4_805_1342.JPEG\"><\/figure>\n<h4>\u6ce8\uff1a<\/h4>\n<ul>\n<li>\u5728resourse\/img\/\u4e2d\u65b0\u589e\u4e00\u4e2atest\u6587\u4ef6\u5939\uff0c\u76ee\u7684\u662f\u4e0a\u4f20\u81ea\u5df1\u7684\u6d4b\u8bd5\u56fe\u7247\u3001\u5360\u4f4d\u56fe\u7247\uff0c\u8bf7\u52ff\u5c06\u7f51\u7ad9\u6b63\u5f0f\u7684\u6587\u4ef6\u653e\u4e8e\u6b64\u6587\u4ef6\u5939\u5185\uff0c\u56e0\u4e3a\u6b64\u6587\u4ef6\u5939\u7684\u5185\u5bb9\u968f\u65f6\u6709\u53ef\u80fd\u5457\u4efb\u4f55\u4eba\u5220\u9664<\/li>\n<li>\u524d\u7aef\u7684\u4eb2\u4eec\u5728\u5199\u5b8ccss\u6587\u4ef6\u51c6\u5907\u4e0a\u4f20\u65f6\uff0c\u6ce8\u610f\u68c0\u67e5\u4e00\u4e0bcss\u6587\u4ef6\u9700\u8981\u7684\u7684\u56fe\u7247\u662f\u5426\u5b58\u5728\uff0c\u662f\u5426\u5b58\u5728\u591a\u4f59\u7684\u56fe\u7247\uff0c\u5c3d\u91cf\u5220\u9664\u3002<\/li>\n<\/ul>\n<h3>\u6587\u4ef6\u7f16\u7801\u7ea6\u5b9a<\/h3>\n<p>\u6240\u6709\u6587\u4ef6\u4e00\u5f8b\u91c7\u7528utf-8\u7f16\u7801<\/p>\n<h3>id \u548c class \u547d\u540d\u7ea6\u5b9a<\/h3>\n<ul>\n<li>id \u548c class \u7684\u547d\u540d\u603b\u89c4\u5219\u4e3a\uff1a \u5185\u5bb9\u4f18\u5148,\u8868\u73b0\u4e3a\u8f85. \u9996\u5148\u6839\u636e\u5185\u5bb9\u6765\u547d\u540d, \u6bd4\u5982 main-nav. \u5982\u679c\u6839\u636e\u5185\u5bb9\u627e\u4e0d\u5230\u5408\u9002\u7684\u547d\u540d, \u53ef\u4ee5\u518d\u7ed3\u5408\u8868\u73b0\u6765\u5b9a, \u6bd4\u5982 skin-blue, present-tab, col-main.<\/li>\n<li>class \u540d\u79f0\u4e00\u5f8b\u5c0f\u5199, \u591a\u4e2a\u5355\u8bcd\u7528\u8fde\u5b57\u7b26\u8fde\u63a5, \u6bd4\u5982 recommend-presents.<\/li>\n<li>class \u540d\u79f0\u4e2d\u53ea\u80fd\u51fa\u73b0\u5c0f\u5199\u7684 26 \u4e2a\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u8fde\u5b57\u7b26(-), \u4efb\u4f55\u5176\u5b83\u5b57\u7b26\u90fd\u4e25\u7981\u51fa\u73b0.<\/li>\n<li>id\u7684\u547d\u540d\u91c7\u7528\u9a7c\u5cf0\u547d\u540d\u6cd5\uff0c\u9996\u5b57\u6bcd\u5c0f\u5199\uff0c\u5982\uff1amainNav<\/li>\n<li>\u4ec5\u5728 JavaScript \u4ee3\u7801\u4e2d\u5f53\u4f5c hook \u7528\u7684 id \u6216 class, \u547d\u540d\u89c4\u5219\u4e3a J_UpperCamelCase&#8220;(\u8bf7\u6ce8\u610f, &#8220;J_ \u540e\u7684\u9996\u5b57\u6bcd\u4e5f\u5927\u5199\uff01), \u5176\u4e2d\u5b57\u6bcd J \u4ee3\u8868 JavaScript, \u4e5f\u662f\u94a9\u5b50(hook)\u7684\u8c61\u5f62. \u6ce8\u610f\uff1a\u5982\u679c\u5728 JavaScript \u548c CSS \u4e2d\u90fd\u9700\u8981\u7528\u5230, \u5219\u4e0d\u7528\u9075\u5b88\u672c\u7ea6\u5b9a<\/li>\n<li>id \u548c class \u5c3d\u91cf\u7528\u82f1\u6587\u5355\u8bcd\u547d\u540d . \u786e\u5b9e\u627e\u4e0d\u5230\u5408\u9002\u7684\u5355\u8bcd\u65f6, \u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u4ea7\u54c1\u7684\u4e2d\u6587\u62fc\u97f3, \u6bd4\u5982 wangwang, dating. \u5bf9\u4e8e\u4e2d\u56fd\u4ee5\u53ca\u6dd8\u5b9d\u7279\u8272\u8bcd\u6c47, \u4e5f\u53ef\u4ee5\u4f7f\u7528\u62fc\u97f3, \u6bd4\u5982 xiaobao, daigou. \u9664\u4e86\u4ea7\u54c1\u540d\u79f0\u548c\u7279\u8272\u8bcd\u6c47, \u5176\u5b83\u4efb\u4f55\u60c5\u51b5\u4e0b\u90fd\u4e25\u7981\u4f7f\u7528\u62fc\u97f3.<\/li>\n<li>\u5728\u4e0d\u5f71\u54cd\u8bed\u4e49\u7684\u60c5\u51b5\u4e0b, id \u548c class \u540d\u79f0\u4e2d\u53ef\u4ee5\u9002\u5f53\u91c7\u7528\u82f1\u6587\u5355\u8bcd\u7f29\u5199, \u6bd4\u5982 col, nav, hd, bd, ft \u7b49, \u4f46\u5207\u5fcc\u81ea\u9020\u7f29\u5199.\uff08\u5e38\u7528\u7f29\u5199\u603b\u7ed3\u5728css\u89c4\u8303\u90e8\u5206\uff09<\/li>\n<li>id \u548c class \u540d\u79f0\u4e2d\u7684\u7b2c\u4e00\u4e2a\u8bcd\u5fc5\u987b\u662f\u5355\u8bcd\u5168\u62fc\u6216\u8bed\u4e49\u975e\u5e38\u6e05\u6670\u7684\u5355\u8bcd\u7f29\u5199, \u6bd4\u5982 present, col.<\/li>\n<li>\u5728\u81ea\u52a8\u5316\u6d4b\u8bd5\u811a\u672c\u4e2d\u5f53\u4f5c hook \u7528\u7684 class, \u547d\u540d\u89c4\u5219\u4e3a T_UpperCamelCase, \u5176\u4e2d\u5b57\u6bcd T \u4ee3\u8868 Test.<\/li>\n<\/ul>\n<h2><a name=\"rule-html\"><\/a>HTML\u89c4\u8303<\/h2>\n<h3>\u7ea6\u5b9a<\/h3>\n<ul>\n<li>\u6240\u6709\u9875\u9762\u5143\u7d20\u7684z-index\u5c5e\u6027\u503c\u63a7\u5236\u57281000\u4ee5\u4e0b\uff0c\u5c061000-2000\u7559\u7ed9\u7ec4\u4ef6\u7ea7\u8c03\u7528\uff0c2000\u4ee5\u4e0a\u7528\u4e8e\u89e3\u51b3\u7279\u6b8a\u60c5\u51b5\u4e0b\u7684\u9002\u5e94\u95ee\u9898\uff1b<\/li>\n<li>\u6240\u6709\u7684\u6807\u7b7e\u53ca\u5c5e\u6027\u540d\u91c7\u7528\u5c0f\u5199\uff0cDOCTYPE\u9664\u5916\uff1b<\/li>\n<li>\u4fdd\u8bc1\u6807\u7b7e\u8bed\u4e49\u5316\uff1b<\/li>\n<li>\u5206\u79bb\u601d\u60f3\uff0c\u6240\u6709\u7684\u6837\u5f0f\u9664\u7279\u6b8a\u60c5\u51b5\uff0ccss\u6837\u5f0f\u4e0d\u80fd\u5185\u8054\u5199\u5728style\u5c5e\u6027\u4e2d\uff1b<\/li>\n<li>table\u4e2d\u4f7f\u7528caption,thead,tbody,tfoot\u6807\u7b7e\u65f6\u82e5\u662f\u4f7f\u7528\u5219\u5efa\u8bae\u5168\u90e8\u4f7f\u7528<\/li>\n<li>\u5982\u975e\u9879\u76ee\u9700\u8981\uff0c\u4e0d\u4f7f\u7528html5\u7279\u6709\u7684\u6807\u7b7e\uff0c\u5982canvas\u3002<\/li>\n<\/ul>\n<h3>DOCTYPE<\/h3>\n<p>\u9875\u9762\u6587\u6863\u7c7b\u578b\u7edf\u4e00\u4f7f\u7528HTML5 DOCTYPE. \u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<blockquote><p>&lt;!doctype html&gt;<\/p><\/blockquote>\n<h3>\u53e6\u5916\u4e00\u79cdDOCTYPE<\/h3>\n<p>\u91c7\u7528\u8fc7\u6e21\u578b &#8211; \u76f8\u5bf9\u8f83\u4e3a\u5bbd\u677e<\/p>\n<blockquote><p>&lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN&#8221; &#8220;http:\/\/www.w3.org\/TR\/html4\/loose.dtd&#8221;&gt;<\/p><\/blockquote>\n<p>Namespace<\/p>\n<blockquote><p>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;<\/p><\/blockquote>\n<p>\u7f16\u7801<\/p>\n<blockquote><p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=utf-8&#8243;&gt;<\/p><\/blockquote>\n<h3>\u7f16\u7801<\/h3>\n<p>\u58f0\u660e\u65b9\u6cd5\u9075\u5faaHTML5\u7684\u89c4\u8303.<\/p>\n<blockquote><p>&lt;meta charset=&#8221;utf-8&#8243; &gt;<\/p><\/blockquote>\n<h3>\u6ce8\u91ca<\/h3>\n<blockquote><p>&lt;!&#8211;{nav start}&#8211;&gt;<br \/>\n&lt;!&#8211;{nav end}&#8211;&gt;<\/p><\/blockquote>\n<h3>\u5143\u7d20<\/h3>\n<h4>\u63a8\u8350\u4f7f\u7528\u7684\u5143\u7d20<\/h4>\n<ol>\n<li>\u7ed3\u6784\u5143\u7d20\uff1ablockquote, body, br, div, h1 &#8211; h6, head, hr, html, p<\/li>\n<li>\u5934\u90e8\u5143\u7d20\uff1abase, link, meta, script, style, title<\/li>\n<li>\u5217\u8868\u5143\u7d20\uff1aul, ol, li, dl, dt, dd<\/li>\n<li>\u6587\u672c\u683c\u5f0f\u5143\u7d20\uff1aa, abbr, acronym, address, bdo, cite, code, del, dfn, em, ins, kbd, noscript, pre, q, samp, small, span, strong, sub, sup, var<\/li>\n<li>\u8868\u5355\u5143\u7d20\uff1abutton, fieldset, legend, form, input, label, optgroup, option, select, textarea<\/li>\n<li>\u591a\u5a92\u4f53\u5143\u7d20\uff1aarea, img, map, object, param<\/li>\n<li>\u8868\u683c\u5143\u7d20\uff1acaption, col, colgroup, table, tbody, td, tfoot, th, thead, tr<\/li>\n<li>\u7a97\u4f53\u5143\u7d20\uff1aiframe<\/li>\n<\/ol>\n<h4>\u4e0d\u63a8\u8350\u4f7f\u7528\u7684\u5143\u7d20<\/h4>\n<ol>\n<li>\u7ed3\u6784\u5143\u7d20\uff1a\u65e0<\/li>\n<li>\u5934\u90e8\u5143\u7d20\uff1a\u65e0<\/li>\n<li>\u5217\u8868\u5143\u7d20\uff1adir, menu<\/li>\n<li>\u6587\u672c\u683c\u5f0f\u5143\u7d20\uff1ab, basefont, big, blink, center, comment, font, i, marquee, nobr, plaintext, ruby, s, strike, u, wbr, xmp<\/li>\n<li>\u8868\u5355\u5143\u7d20\uff1aisindex<\/li>\n<li>\u591a\u5a92\u4f53\u5143\u7d20\uff1aapplet, bgsound, embed, noembed<\/li>\n<li>\u8868\u683c\u5143\u7d20\uff1a\u65e0<\/li>\n<li>\u7a97\u4f53\u5143\u7d20\uff1aframe, frameset, noframes<\/li>\n<\/ol>\n<h4>\u8f6c\u4e16\u91cd\u751f\u7684\u5143\u7d20<\/h4>\n<ol>\n<li>s &#8211; \u8868\u793a sprite, \u53ef\u4ee5\u7528 &lt;s&gt;&lt;\/s&lt;&gt; \u6765\u505a icon \u7684\u5360\u4f4d\u5143\u7d20<\/li>\n<li>b &#8211; \u8868\u793a border, \u53ef\u4ee5\u7528\u6765\u4f5c\u4e3a\u5706\u89d2\u7684\u5360\u4f4d\u5143\u7d20<\/li>\n<li>i &#8211; \u9884\u7559\uff0c\u5c1a\u672a\u60f3\u5230\u5408\u7406\u7684\u590d\u6d3b\u7406\u7531\uff08\u53ef\u4ee5\u8003\u8651\u4f5c\u4e3a\u5355\u4e2a\u56fe\u6807\u7684\u5c55\u4f4d\u7b26\uff0c\u8868\u793aicon\uff09<\/li>\n<\/ol>\n<h2><a name=\"rule-css\"><\/a>CSS\u89c4\u8303<\/h2>\n<h3>\u57fa\u672c\u89c4\u8303<\/h3>\n<ul>\n<li>\u6a21\u5757\u547d\u540d\u8981\u6ce8\u610f\u5e26\u4e0a\u6a21\u5757\u540d\uff0c\u4e0b\u9762\u5c3d\u53ef\u80fd\u7684\u7b80\u5199\uff0c\u9875\u9762\u7ea7\uff08app\u5e94\u7528\u7ea7\uff09\u547d\u540d\u5e94\u8be5\u5c3d\u91cf\u7b80\u6d01<\/li>\n<li>\u5c3d\u53ef\u80fd\u5730\u4f7f\u7528css-sprite<\/li>\n<li>\u5c3d\u91cf\u901a\u8fc7class\u5c5e\u6027\u5b9a\u4e49\u6837\u5f0f,\u5c06id\u7559\u7ed9hook<\/li>\n<li>\u5c3d\u91cf\u4e0d\u8981\u5728css\u4e2d\u4f7f\u7528expression<\/li>\n<li>\u7ec4\u4ef6\u5f00\u53d1\u4e2d\uff0c\u53ef\u4ee5\u5148\u4e0d\u8003\u8651\u6027\u80fd\uff0c\u5c3d\u91cf\u4f7f\u7528\u9009\u62e9\u7b26\u7ec4\u4ee5\u65b9\u4fbfhtml\u8c03\u7528,\u5982 .table-ctrl tbody tr td.selected{}<\/li>\n<li>font\u4e2d\u7684\u5b57\u4f53\u7528\u82f1\u6587\u6216unicode\u4ee3\u66ff,\u5982\u9ed1\u4f53\u53ef\u5199\u6210SimHei\uff1afont:12px\/1.5 SimHei ,tahoma,arial,\\5b8b\\4f53,sans-serif;<\/li>\n<li>\u5199css\u5c5e\u6027\u65f6\uff0c\u2018\uff1a\u2019\u540e\u9762\u52a0\u4e00\u4e2a\u7a7a\u683c\u589e\u52a0\u53ef\u8bfb\u6027<\/li>\n<\/ul>\n<h3>\u5f15\u7528<\/h3>\n<p>\u7edf\u4e00\u4ee5link\u5f62\u5f0f\u5f15\u5165\uff0c\u4e0d\u63a8\u8350\u5185\u5d4c\u5f62\u5f0f\u5f15\u5165css, \u4e0d\u63a8\u8350&lt;style&gt;&lt;\/style&gt;\u6807\u7b7e\u51fa\u73b0\u5728body\u4e2d\u3002\u4e0d\u63a8\u8350\u5185\u8054CSS\u3002\u5982\u6709\u7279\u522b\u9700\u8981(\u77ed\u671f\u63a8\u5e7f\uff0c\u7279\u5b9a\u60c5\u51b5\u7684\u9875\u9762\/404\u9519\u8bef\u9875\u9762)\uff0c\u8bf7\u5c3d\u91cf\u653e\u5728head\u6807\u7b7e\u5185<\/p>\n<blockquote><p>&lt;style type=&#8221;text\/css&#8221; media=&#8221;style\/x.css&#8221;&gt;&lt;\/style&gt;<\/p><\/blockquote>\n<p>\u5e38\u89c4\u5f15\u5165css\u6587\u4ef6<\/p>\n<blockquote><p>&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; href=&#8221;style\/x.css&#8221;&gt;&lt;\/link&gt;<\/p><\/blockquote>\n<h3>\u5e38\u7528css\u5c5e\u6027\u987a\u5e8f\u5efa\u8bae<\/h3>\n<ul>\n<li>\u663e\u793a\u5c5e\u6027(display, list-style, position, float, clear)<\/li>\n<li>\u76d2\u6a21\u578b(width, height, margin, padding, border, background)<\/li>\n<li>\u6587\u672c\u5c5e\u6027(color, font, text-decoration, text-align, vertical-align, white-space, other text, content)<\/li>\n<\/ul>\n<h3>\u6ce8\u91ca\u98ce\u683c<\/h3>\n<h4>\u5934\u6ce8\u91ca<\/h4>\n<blockquote><p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n@Filename: main.css<br \/>\n@Description: \u5168\u5c40css\u5b9a\u4e49<br \/>\n@Version: 1.0.0(2009-12-28)YYYY-MM-DD<br \/>\n@author: simon-shen<br \/>\n==STRUCTURE:=========================================<br \/>\n$__header<br \/>\n$__menu<br \/>\n==NOTES:=============================================<br \/>\n2011-11-2:<br \/>\n\u521d\u59cb\u751f\u6210\u3002<br \/>\n2011-11-3:<br \/>\n\u66f4\u6539\u6587\u6863\u7ed3\u6784\u548c\u6ce8\u91ca<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*\/<\/p><\/blockquote>\n<h4>\u533a\u5757<\/h4>\n<blockquote><p>\/*__header<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*\/<\/p>\n<p>\/*__menu<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*\/<\/p><\/blockquote>\n<h3>\u7f16\u7801\u98ce\u683c<\/h3>\n<h4>Css\u7ec4\u5408\u5d4c\u5957\u7684\u65f6\u5019\u91c7\u7528\u6362\u884c\u4ee5\u63d0\u9ad8\u53ef\u8bfb\u6027<\/h4>\n<blockquote><p>h2 { color: red; }<br \/>\n.w3cbbs { color: red; }<br \/>\n.w3cbbs_52css { color: red; }<\/p><\/blockquote>\n<p>\u5219\u53ef\u4ee5\u8fd9\u6837\u5199<\/p>\n<blockquote><p>h2,<br \/>\n.w3cbbs,<br \/>\n.w3cbbs_52css { color: red; }<\/p><\/blockquote>\n<h4>\u5982\u679c\u5bf9css\u6587\u4ef6\u4e0d\u9002\u7528\u6700\u5c0f\u5316\u5904\u7406\uff0c\u53d1\u5e03\u65f6\u91c7\u7528single-line\u5904\u7406\uff0c\u5982\uff1a<\/h4>\n<blockquote><p>.form-normal .field{position:relative;border-bottom:1px solid #ddd;overflow:hidden;}<\/p><\/blockquote>\n<h4>\u5e38\u7528css\u547d\u540d\u53c2\u8003<\/h4>\n<p>\u5bfc\u822a \u9875\u5934 \u4e3b\u5bfc\u822a \u9875\u9762\u4e3b\u4f53 \u9876\u5bfc\u822a \u5185\u5bb9 \u5b50\u5bfc\u822a \u9875\u811a \u83dc\u5355 \u7248\u6743 \u5b50\u83dc\u5355 \u767b\u9646 \u6807\u5fd7 \u4fa7\u680f \u5e7f\u544a \u641c\u7d22 \u6eda\u52a8 \u6807\u7b7e\u9875 \u5c0f\u6280\u5de7 \u5408\u4f5c\u4f19\u4f34 \u52a0\u5165 \u6807\u9898 \u6ce8\u518c \u6307\u5357 \u65b0\u95fb \u4e0b\u8f7d \u6309\u94ae \u72b6\u6001 \u670d\u52a1 \u6295\u7968 \u6ce8\u91ca \u53cb\u60c5\u94fe\u63a5<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td width=\"30%\">nav<\/td>\n<td width=\"30%\">header<\/td>\n<\/tr>\n<tr>\n<td>mainnav<\/td>\n<td>main<\/td>\n<\/tr>\n<tr>\n<td>topnav<\/td>\n<td>content<\/td>\n<\/tr>\n<tr>\n<td>subnav<\/td>\n<td>footer<\/td>\n<\/tr>\n<tr>\n<td>menu<\/td>\n<td>copyright<\/td>\n<\/tr>\n<tr>\n<td>submenu<\/td>\n<td>login<\/td>\n<\/tr>\n<tr>\n<td>logo<\/td>\n<td>sidebar<\/td>\n<\/tr>\n<tr>\n<td>banner<\/td>\n<td>search<\/td>\n<\/tr>\n<tr>\n<td>scroll<\/td>\n<td>tab<\/td>\n<\/tr>\n<tr>\n<td>tips<\/td>\n<td>partner<\/td>\n<\/tr>\n<tr>\n<td>joinus<\/td>\n<td>title<\/td>\n<\/tr>\n<tr>\n<td>regsiter<\/td>\n<td>g<a href=\"http:\/\/liumiao.me\/html\/list_567.html\" target=\"_blank\">UI<\/a>ld<\/td>\n<\/tr>\n<tr>\n<td>news<\/td>\n<td>download<\/td>\n<\/tr>\n<tr>\n<td>button<\/td>\n<td>status<\/td>\n<\/tr>\n<tr>\n<td>service<\/td>\n<td>vote<\/td>\n<\/tr>\n<tr>\n<td>note<\/td>\n<td>friendlink<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a name=\"rule-js\"><\/a>Javascript\u89c4\u8303<\/h2>\n<h3>\u547d\u540d\u53c2\u8003<\/h3>\n<p>\u539f\u5219\uff1a * \u5c3d\u91cf\u907f\u514d\u6f5c\u5728\u51b2\u7a81; * \u7cbe\u7b80\u77ed\u5c0f, \u89c1\u540d\u77e5\u610f<\/p>\n<ul>\n<li>\u5168\u5c40\u53d8\u91cf\u4ee5$\u5f00\u5934\uff0c\u5982$user\uff0c\u76f8\u5f53\u4e8e\uff1awindow.$user<\/li>\n<li>\u5e38\u91cf\u5168\u90e8\u5927\u5199\uff0c\u5355\u8bcd\u4ee5\u4e0b\u5212\u7ebf\u5206\u9694\uff0c\u5982STATIC_ROOT<\/li>\n<li>\u53d8\u91cf\u91c7\u7528\u9a6e\u5cf0\u5f0f\u5199\u6cd5\uff0c\u5982userIcon\uff0cUserRelation<\/li>\n<li>\u7c7b\u540d\u9996\u5b57\u6bcd\u5927\u5199\uff0c\u5982Object = function(){}<\/li>\n<li>\u666e\u901a\u53d8\u91cf\u3001\u547d\u540d\u7a7a\u95f4\uff0c\u9996\u5b57\u6bcd\u5c0f\u5199<\/li>\n<li>\u5c40\u90e8\u53d8\u91cf\u53ef\u7f29\u5199\uff0c\u547d\u540d\u7a7a\u95f4\uff0c\u7c7b\u540d\u5c3d\u91cf\u4e0d\u7f29\u5199<\/li>\n<li>\u6761\u4ef6\u8868\u8fbe\u5f0f\u3001\u6b63\u5219\u8868\u5f0f\u5f0f\uff0c\u5982\u679c\u5f88\u590d\u6742\uff0c\u7ed9\u5176\u547d\u540d<\/li>\n<li>\u679a\u4e3e\u91cf, \u540c\u5e38\u91cf;<\/li>\n<li>\u79c1\u6709\u53d8\u91cf, \u5c5e\u6027\u548c\u65b9\u6cd5, \u540d\u5b57\u4ee5\u4e0b\u5212\u7ebf\u5f00\u5934,\u5982_init(),_param;<\/li>\n<li>\u4fdd\u62a4\u53d8\u91cf, \u5c5e\u6027\u548c\u65b9\u6cd5, \u540d\u5b57\u540c\u666e\u901a\u53d8\u91cf\u540d;<\/li>\n<li>\u65b9\u6cd5\u548c\u51fd\u6570\u7684\u53ef\u9009\u53c2\u6570, \u540d\u5b57\u4ee5 opt_ \u5f00\u5934, \u4f7f\u7528 @param \u6807\u8bb0\u8bf4\u660e;(\u8bd5\u884c)<\/li>\n<li>\u4f7f\u7528 @param \u6807\u8bb0\u8bf4\u660e;<\/li>\n<li>\u5916\u90e8\u4ee3\u7801\u548c\u5185\u90e8\u4ee3\u7801\u4f7f\u7528\u4e0d\u540c\u7684\u547d\u540d\u7a7a\u95f4;<\/li>\n<li>\u91cd\u547d\u540d\u90a3\u4e9b\u540d\u5b57\u5f88\u957f\u7684\u53d8\u91cf, \u4e0d\u8981\u5728\u5168\u5c40\u8303\u56f4\u5185\u521b\u5efa\u522b\u540d, \u800c\u4ec5\u5728\u51fd\u6570\u5757\u4f5c\u7528\u57df\u4e2d\u4f7f\u7528;<\/li>\n<li>\u6587\u4ef6\u540d\u5e94\u5168\u90e8\u4f7f\u7528\u5c0f\u5199\u5b57\u7b26, \u4e14\u4e0d\u5305\u542b\u9664 &#8211; \u548c _ \u5916\u7684\u6807\u70b9\u7b26\u53f7;<\/li>\n<li>\u4e34\u65f6\u7684\u91cd\u590d\u53d8\u91cf\u5efa\u8bae\u4ee5 i, j, k, &#8230;, \u547d\u540d;<\/li>\n<\/ul>\n<h3>\u539f\u5219<\/h3>\n<ul>\n<li>\u4efb\u4f55\u63d2\u4ef6\u7684\u5f00\u53d1\u90fd\u8981\u5199\u5165version\u53c2\u6570\uff0c\u81f3\u5c11\u8981\u5728\u6ce8\u91ca\u4e2d\u6ce8\u660e\u7248\u672c\u4fe1\u606f\u53ca\u4fee\u6539\u5185\u5bb9.<\/li>\n<li>\u58f0\u660e\u53d8\u91cf\u65f6, \u5fc5\u987b\u52a0\u4e0a var \u5173\u952e\u5b57.<\/li>\n<li>\u5c3d\u91cf\u51cf\u5c11\u5168\u5c40\u53d8\u91cf\u7684\u4f7f\u7528.<\/li>\n<li>\u8bed\u53e5\u603b\u662f\u4ee5\u5206\u53f7\u7ed3\u5c3e.<\/li>\n<li>\u4e0d\u8981\u5728\u5757\u5185\u58f0\u660e\u51fd\u6570.<\/li>\n<li>\u6807\u51c6\u7279\u6027\u4f18\u4e8e\u975e\u6807\u51c6\u7279\u6027(\u5982\u679c\u7c7b\u5e93\u6709\u63d0\u4f9b, \u4f18\u5148\u4f7f\u7528\u7c7b\u5e93\u4e2d\u7684\u51fd\u6570).<\/li>\n<li>\u4e0d\u8981\u5c01\u88c5\u57fa\u672c\u7c7b\u578b.<\/li>\n<li>\u53ea\u5728\u89e3\u6790\u5e8f\u5217\u5316\u4e32\u65f6\u4f7f\u7528 eval() .<\/li>\n<li>\u7981\u6b62\u4f7f\u7528 with .<\/li>\n<li>\u51cf\u5c11\u4f7f\u7528 continue \u548c break .<\/li>\n<li>\u4ec5\u5728\u51fd\u6570\u5185\u4f7f\u7528 this .<\/li>\n<li>\u4f7f\u7528 Array\/Object \u76f4\u63a5\u91cf, \u907f\u514d\u4f7f\u7528 Array\/Object \u6784\u9020\u5668.<\/li>\n<li>\u7981\u6b62\u4fee\u6539\u5185\u7f6e\u5bf9\u8c61\u7684\u539f\u578b.<\/li>\n<li>\u575a\u51b3\u4e0d\u5728\u4e3b\u9875\u9762\u4e2d\u5d4c\u5165\u903b\u8f91\u811a\u672c\uff0c<\/li>\n<li>\u575a\u51b3\u4e0d\u5728ajax\u8f7d\u5165\u7684HTML\u7247\u6bb5\u91cc\u9762\u5d4c\u5165\u811a\u672c\uff0c\u8f7d\u5165\u540e\u8981\u6267\u884c\u4ee3\u7801\uff0c\u53ef\u4ee5\u5199\u5728\u56de\u8c03\u91cc\u9762<\/li>\n<\/ul>\n<h3>\u7f16\u7801\u98ce\u683c<\/h3>\n<h4>\u5f15\u7528<\/h4>\n<blockquote><p>&lt;script type=&#8221;text\/javascript&#8221; src=\u201dxx\u201d&gt;&lt;\/script&gt;<\/p><\/blockquote>\n<h4>\u9875\u9762\u5185\u7684\u811a\u672c\u53ea\u4f5c\u521d\u59cb\u5316\u53ca\u53c2\u6570\u914d\u7f6e\u4f7f\u7528<\/h4>\n<blockquote><p>&lt;script type=&#8221;text\/javascript&#8221;&gt;<br \/>\n$(function(){<br \/>\n$.nav.init({<br \/>\nid : 1,<br \/>\nname : &#8216;simon&#8217;<br \/>\n})<br \/>\n})<br \/>\n&lt;\/script&gt;<\/p><\/blockquote>\n<p>\u6ce8\uff1a\u5177\u4f53\u4f7f\u4e0d\u4f7f\u7528init()\u51fd\u6570\u89c6\u5177\u4f53\u60c5\u51b5\u53ca\u4e2a\u4eba\u7f16\u7a0b\u4e60\u60ef\u800c\u5b9a\uff0c\u4f46\u662f\u4e2a\u4eba\u5efa\u8bae\u4f7f\u7528\uff0c\u65b9\u4fbf\u8bfb\u4ee3\u7801\u7684\u4eba\u627e\u5230\u5165\u53e3<\/p>\n<h4>\u884c\u4e0e\u7f29\u8fdb<\/h4>\n<p>\u8bed\u53e5\u884c<\/p>\n<ul>\n<li>\u5c3d\u53ef\u80fd\u4e0d\u8981\u8ba9\u6bcf\u884c\u8d85\u8fc7 120 \u4e2a\u5b57\u7b26;<\/li>\n<li>\u8bed\u53e5\u5fc5\u987b\u4ee5\u5206\u53f7\u4f5c\u4e3a\u7ed3\u675f\u7b26, \u4e0d\u8981\u5ffd\u7565\u5206\u53f7;<\/li>\n<\/ul>\n<p>\u7a7a\u683c<\/p>\n<ul>\n<li>\u6570\u503c\u64cd\u4f5c\u7b26(\u5982, +\/-\/*\/% \u7b49)\u4e24\u8fb9\u7559\u7a7a;<\/li>\n<li>\u8d4b\u503c\u64cd\u4f5c\u7b26\/\u7b49\u4ef7\u5224\u65ad\u7b26\u4e24\u8fb9\u7559\u4e00\u7a7a\u683c;<\/li>\n<li>for \u5faa\u73af\u6761\u4ef6\u4e2d, \u5206\u53f7\u540e\u7559\u4e00\u7a7a\u683c;<\/li>\n<li>\u53d8\u91cf\u58f0\u660e\u8bed\u53e5, \u6570\u7ec4\u503c, \u5bf9\u8c61\u503c\u53ca\u51fd\u6570\u53c2\u6570\u503c\u4e2d\u7684\u9017\u53f7\u540e\u7559\u4e00\u7a7a\u683c;<\/li>\n<li>\u7a7a\u884c\u4e0d\u8981\u6709\u7a7a\u683c;<\/li>\n<li>\u884c\u5c3e\u4e0d\u8981\u6709\u7a7a\u683c;<\/li>\n<li>\u9017\u53f7\u548c\u5192\u53f7\u540e\u4e00\u5b9a\u8981\u8ddf\u7a7a\u683c;<\/li>\n<li>\u70b9\u53f7\u524d\u540e\u4e0d\u8981\u51fa\u73b0\u7a7a\u683c;<\/li>\n<li>\u7a7a\u5bf9\u8c61\u548c\u6570\u7ec4\u4e0d\u9700\u8981\u586b\u5165\u7a7a\u683c;<\/li>\n<li>\u51fd\u6570\u540d\u672b\u5c3e\u548c\u5de6\u62ec\u53f7\u4e4b\u95f4\u4e0d\u8981\u51fa\u73b0\u7a7a\u683c;<\/li>\n<\/ul>\n<p>\u7a7a\u884c<\/p>\n<ul>\n<li>\u903b\u8f91\u4e0a\u72ec\u7acb\u7684\u4ee3\u7801\u5757\u4f7f\u7528\u7a7a\u884c\u5206\u9694;<\/li>\n<li>\u6587\u4ef6\u672b\u5c3e\u7559 1~2 \u4e2a\u7a7a\u884c;<\/li>\n<li>\u4e0d\u8981\u541d\u556c\u7a7a\u884c. \u5c3d\u91cf\u4f7f\u7528\u7a7a\u884c\u5c06\u903b\u8f91\u76f8\u5173\u7684\u4ee3\u7801\u5757\u5206\u5272\u5f00, \u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u53ef\u8bfb\u6027.<\/li>\n<\/ul>\n<h4>\u53d8\u91cf\u58f0\u660e<\/h4>\n<ul>\n<li>\u591a\u4e2a\u53d8\u91cf\u58f0\u660e\u65f6, \u9002\u5f53\u6362\u884c\u8868\u793a;<\/li>\n<li>\u53c2\u7167 var \u5173\u952e\u5b57, \u7f29\u8fdb\u4e00\u5c42\u6b21;<\/li>\n<\/ul>\n<h4>\u51fd\u6570\u53c2\u6570<\/h4>\n<ul>\n<li>\u51fd\u6570\u53c2\u6570\u5199\u5728\u540c\u4e00\u884c\u4e0a;<\/li>\n<li>\u4f20\u9012\u533f\u540d\u51fd\u6570\u65f6, \u51fd\u6570\u4f53\u5e94\u4ece\u8c03\u7528\u8be5\u51fd\u6570\u7684\u5de6\u8fb9\u5f00\u59cb\u7f29\u8fdb;<\/li>\n<li>\u6570\u7ec4\u548c\u5bf9\u8c61\u521d\u59cb\u5316\u65f6:\u5982\u679c\u521d\u59cb\u503c\u4e0d\u662f\u5f88\u957f, \u5c3d\u91cf\u4fdd\u6301\u5199\u5728\u5355\u884c\u4e0a;<\/li>\n<li>\u521d\u59cb\u503c\u5360\u7528\u591a\u884c\u65f6, \u7f29\u8fdb\u4e00\u5c42\u6b21;<\/li>\n<li>\u5bf9\u8c61\u4e2d, \u6bd4\u8f83\u957f\u7684\u53d8\u91cf\/\u6570\u503c, \u4e0d\u8981\u4ee5\u5192\u53f7\u5bf9\u9f50;<\/li>\n<li>\u4e8c\u5143\/\u4e09\u5143\u64cd\u4f5c\u7b26:\u64cd\u4f5c\u7b26\u59cb\u7ec8\u8ddf\u968f\u524d\u884c;<\/li>\n<li>\u5b9e\u5728\u9700\u8981\u7f29\u8fdb\u65f6, \u6309\u7167\u4e0a\u8ff0\u7f29\u8fdb\u98ce\u683c;<\/li>\n<li>\u8868\u8fbe\u5f0f\u4e2d\u7684\u7f29\u8fdb\u540c\u53d8\u91cf\u58f0\u660e\u65f6;<\/li>\n<\/ul>\n<h4>\u62ec\u53f7<\/h4>\n<ul>\n<li>\u539f\u5219: \u4e0d\u8981\u6ee5\u7528\u62ec\u53f7, \u5fc5\u8981\u65f6\u4e00\u5b9a\u8981\u4f7f\u7528.<\/li>\n<li>if\/else\/while\/for \u6761\u4ef6\u8868\u8fbe\u5f0f\u5fc5\u987b\u6709\u5c0f\u62ec\u53f7;<\/li>\n<li>\u8bed\u53e5\u5757\u5fc5\u987b\u6709\u5927\u62ec\u53f7;<\/li>\n<li>\u4e00\u5143\u64cd\u4f5c\u7b26(\u5982 delete, typeof, void)\u6216\u5728\u67d0\u4e9b\u5173\u952e\u8bcd(\u5982 return, throw, case, new) \u4e4b\u540e, \u4e0d\u8981\u4f7f\u7528\u62ec\u53f7;<\/li>\n<\/ul>\n<h4>\u8bed\u53e5\u884c<\/h4>\n<ul>\n<li>\u53d8\u91cf\u5982\u6709\u8f83\u5e7f\u7684\u4f5c\u7528\u57df, \u4f7f\u7528\u5168\u5c40\u53d8\u91cf; \u5982\u679c\u662f\u5728\u7c7b\u4e2d, \u53ef\u4ee5\u8bbe\u8ba1\u6210\u4e3a\u4e00\u4e2a\u7c7b\u7684\u6210\u5458;<\/li>\n<li>\u51fd\u6570\u4f53\u4e2d, \u591a\u4e2a\u5c40\u90e8\u53d8\u91cf\u96c6\u4e2d\u5728\u4e00\u8d77\u58f0\u660e, \u907f\u514d\u5206\u6563;<\/li>\n<li>\u9002\u5f53\u5ef6\u8fdf\u53d8\u91cf\u7684\u521d\u59cb\u5316;<\/li>\n<\/ul>\n<h4>\u5b57\u7b26\u4e32<\/h4>\n<ul>\n<li>JS \u4ee3\u7801\u4e2d, \u5355\u884c\u5b57\u7b26\u4e32\u4f7f\u7528\u5355\u5f15\u53f7;<\/li>\n<li>JS \u4ee3\u7801\u4e2d, \u591a\u884c\u5b57\u7b26\u4e32\u4f7f\u7528 + \u62fc\u63a5\u5f62\u5f0f, \u4e0d\u8981\u4f7f\u7528 \\ \u62fc\u63a5;<\/li>\n<li>HTML \u4e2d Element \u5c5e\u6027, \u4f7f\u7528\u53cc\u5f15\u53f7;<\/li>\n<\/ul>\n<h2><a name=\"rule-doc\"><\/a>\u6807\u51c6\u6587\u6863\u5b9e\u4f8b<\/h2>\n<ul>\n<li><a href=\"http:\/\/rule-fe.diandian.com\/post\/2011-11-07\/6578378\">\u6807\u51c6html\u6587\u6863<\/a><\/li>\n<li><a href=\"http:\/\/rule-fe.diandian.com\/post\/2011-11-07\/6566461\">\u6807\u51c6css\u6587\u6863<\/a><\/li>\n<li><a href=\"http:\/\/rule-fe.diandian.com\/post\/2011-11-08\/6592655\">js\u53c2\u8003\u6587\u6863<\/a><\/li>\n<\/ul>\n<h2><a name=\"rule-lib\"><\/a>\u901a\u7528\u6a21\u677f\u5e93<\/h2>\n<p>\u51c6\u5907\u4e2d\u2026\u2026<\/p>\n<h2><a name=\"rule-resources\"><\/a>\u8d44\u6e90\u5217\u8868<\/h2>\n<ul>\n<li><a href=\"http:\/\/rule-fe.diandian.com\/post\/2011-11-08\/6592464\">\u5b57\u4f53\u7f16\u7801\u67e5\u8be2<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u7528\u7ea6\u5b9a \u6587\u4ef6\u4e0e\u76ee\u5f55\u547d\u540d \u4e00\u5f8b\u5c0f\u5199, \u5fc5\u987b\u662f\u82f1\u6587\u5355\u8bcd\u6216\u4ea7\u54c1\u540d\u79f0\u7684\u62fc\u97f3, \u591a\u4e2a\u5355\u8bcd\u7528\u8fde\u5b57\u7b26(-)\u8fde\u63a5. \u53ea\u80fd\u51fa\u73b0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-2761","post","type-post","status-publish","format-standard","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/2761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2761"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/2761\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}