{"id":2577,"date":"2012-10-14T10:42:20","date_gmt":"2012-10-14T02:42:20","guid":{"rendered":"http:\/\/vanabel.sinaapp.com\/?p=2577"},"modified":"2012-10-14T10:42:20","modified_gmt":"2012-10-14T02:42:20","slug":"%e8%bd%ac%e8%bd%bd%e8%87%aa%e9%80%82%e5%ba%94%e7%bd%91%e9%a1%b5%e8%ae%be%e8%ae%a1%ef%bc%88responsive-web-design","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=2577","title":{"rendered":"[\u8f6c\u8f7d]\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1\uff08Responsive Web Design)"},"content":{"rendered":"<p>\u53c2\u8003:<a href=\"http:\/\/webdesignerwall.com\/tutorials\/responsive-design-in-3-steps\" target=\"_blank\"><\/a><br \/>\n\u968f\u77403G\u7684\u666e\u53ca\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u4eba\u4f7f\u7528\u624b\u673a\u4e0a\u7f51\u3002<\/p>\n<p>\u79fb\u52a8\u8bbe\u5907\u6b63\u8d85\u8fc7\u684c\u9762\u8bbe\u5907\uff0c\u6210\u4e3a\u8bbf\u95ee\u4e92\u8054\u7f51\u7684\u6700\u5e38\u89c1\u7ec8\u7aef\u3002\u4e8e\u662f\uff0c\u7f51\u9875\u8bbe\u8ba1\u5e08\u4e0d\u5f97\u4e0d\u9762\u5bf9\u4e00\u4e2a\u96be\u9898\uff1a\u5982\u4f55\u624d\u80fd\u5728\u4e0d\u540c\u5927\u5c0f\u7684\u8bbe\u5907\u4e0a\u5448\u73b0\u540c\u6837\u7684\u7f51\u9875\uff1f<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.59n.net\/file\/20120707\/6891353201205095-1.jpg\" alt=\"\" \/><\/p>\n<p>\u624b\u673a\u7684\u5c4f\u5e55\u6bd4\u8f83\u5c0f\uff0c\u5bbd\u5ea6\u901a\u5e38\u5728600\u50cf\u7d20\u4ee5\u4e0b\uff1bPC\u7684\u5c4f\u5e55\u5bbd\u5ea6\uff0c\u4e00\u822c\u90fd\u57281000\u50cf\u7d20\u4ee5\u4e0a\uff08\u76ee\u524d\u4e3b\u6d41\u5bbd\u5ea6\u662f1366\u00d7768\uff09\uff0c\u6709\u7684\u8fd8\u8fbe\u5230\u4e862000\u50cf\u7d20\u3002\u540c\u6837\u7684\u5185\u5bb9\uff0c\u8981\u5728\u5927\u5c0f\u8fe5\u5f02\u7684\u5c4f\u5e55\u4e0a\uff0c\u90fd\u5448\u73b0\u51fa\u6ee1\u610f\u7684\u6548\u679c\uff0c\u5e76\u4e0d\u662f\u4e00\u4ef6\u5bb9\u6613\u7684\u4e8b\u3002<br \/>\n<!--more--><br \/>\n\u5f88\u591a\u7f51\u7ad9\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u662f\u4e3a\u4e0d\u540c\u7684\u8bbe\u5907\u63d0\u4f9b\u4e0d\u540c\u7684\u7f51\u9875\uff0c\u6bd4\u5982\u4e13\u95e8\u63d0\u4f9b\u4e00\u4e2amobile\u7248\u672c\uff0c\u6216\u8005iPhone \/ iPad\u7248\u672c\u3002\u8fd9\u6837\u505a\u56fa\u7136\u4fdd\u8bc1\u4e86\u6548\u679c\uff0c\u4f46\u662f\u6bd4\u8f83\u9ebb\u70e6\uff0c\u540c\u65f6\u8981\u7ef4\u62a4\u597d\u51e0\u4e2a\u7248\u672c\uff0c\u800c\u4e14\u5982\u679c\u4e00\u4e2a\u7f51\u7ad9\u6709\u591a\u4e2aportal\uff08\u5165\u53e3\uff09\uff0c\u4f1a\u5927\u5927\u589e\u52a0\u67b6\u6784\u8bbe\u8ba1\u7684\u590d\u6742\u5ea6\u3002<\/p>\n<p>\u4e8e\u662f\uff0c\u5f88\u65e9\u5c31\u6709\u4eba\u8bbe\u60f3\uff0c\u80fd\u4e0d\u80fd&#8221;\u4e00\u6b21\u8bbe\u8ba1\uff0c\u666e\u904d\u9002\u7528&#8221;\uff0c\u8ba9\u540c\u4e00\u5f20\u7f51\u9875\u81ea\u52a8\u9002\u5e94\u4e0d\u540c\u5927\u5c0f\u7684\u5c4f\u5e55\uff0c\u6839\u636e\u5c4f\u5e55\u5bbd\u5ea6\uff0c\u81ea\u52a8\u8c03\u6574\u5e03\u5c40\uff08layout\uff09\uff1f<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.59n.net\/file\/20120707\/6901353201205095-2.jpg\" alt=\"\" \/><\/p>\n<p class=\"artdir1\">\u4e00\u3001&#8221;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;\u7684\u6982\u5ff5<\/p>\n<p>2010\u5e74\uff0cEthan Marcotte\u63d0\u51fa\u4e86<a class=\"content_a\" href=\"http:\/\/www.alistapart.com\/articles\/responsive-web-design\/\" target=\"_blank\">&#8220;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;<\/a><br \/>\n\uff08Responsive Web Design\uff09\u8fd9\u4e2a\u540d\u8bcd\uff0c\u6307\u53ef\u4ee5\u81ea\u52a8\u8bc6\u522b\u5c4f\u5e55\u5bbd\u5ea6\u3001\u5e76\u505a\u51fa\u76f8\u5e94\u8c03\u6574\u7684\u7f51\u9875\u8bbe\u8ba1\u3002<\/p>\n<p>\u4ed6\u5236\u4f5c\u4e86\u4e00\u4e2a<a class=\"content_a\" href=\"http:\/\/www.alistapart.com\/d\/responsive-web-design\/ex\/ex-site-flexible.html\" target=\"_blank\">\u8303\u4f8b<\/a><br \/>\n\uff0c\u91cc\u9762\u662f\u300a\u798f\u5c14\u6469\u65af\u5386\u9669\u8bb0\u300b\u516d\u4e2a\u4e3b\u4eba\u516c\u7684\u5934\u50cf\u3002\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5927\u4e8e1300\u50cf\u7d20\uff0c\u52196\u5f20\u56fe\u7247\u5e76\u6392\u5728\u4e00\u884c\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.59n.net\/file\/20120707\/6911353201205095-3.jpg\" alt=\"\" \/><\/p>\n<p>\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5728600\u50cf\u7d20\u52301300\u50cf\u7d20\u4e4b\u95f4\uff0c\u52196\u5f20\u56fe\u7247\u5206\u6210\u4e24\u884c\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.59n.net\/file\/20120707\/6921353201205095-4.jpg\" alt=\"\" \/><\/p>\n<p>\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5728400\u50cf\u7d20\u5230600\u50cf\u7d20\u4e4b\u95f4\uff0c\u5219\u5bfc\u822a\u680f\u79fb\u5230\u7f51\u9875\u5934\u90e8\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.59n.net\/file\/20120707\/6931353201205095-5.jpg\" alt=\"\" \/><\/p>\n<p>\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5728400\u50cf\u7d20\u4ee5\u4e0b\uff0c\u52196\u5f20\u56fe\u7247\u5206\u6210\u4e09\u884c\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.59n.net\/file\/20120707\/6941353201205095-6.jpg\" alt=\"\" \/><\/p>\n<p><a class=\"content_a\" href=\"http:\/\/mediaqueri.es\/\" target=\"_blank\">mediaqueri.es<\/a><br \/>\n\u4e0a\u9762\u6709\u66f4\u591a\u8fd9\u6837\u7684\u4f8b\u5b50\u3002<\/p>\n<p>\u8fd9\u91cc\u8fd8\u6709\u4e00\u4e2a\u6d4b\u8bd5\u5c0f\u5de5\u5177<a class=\"content_a\" href=\"http:\/\/www.benjaminkeen.com\/misc\/bricss\/\" target=\"_blank\">\uff08\u70b9\u51fb\u4e0b\u8f7d\uff09<\/a><br \/>\n\uff0c\u53ef\u4ee5\u5728\u4e00\u5f20\u7f51\u9875\u4e0a\uff0c\u540c\u65f6\u663e\u793a\u4e0d\u540c\u5206\u8fa8\u7387\u5c4f\u5e55\u7684\u6d4b\u8bd5\u6548\u679c\uff0c\u6211\u63a8\u8350\u5b89\u88c5\u3002<\/p>\n<p class=\"artdir1\">\u4e8c\u3001\u5141\u8bb8\u7f51\u9875\u5bbd\u5ea6\u81ea\u52a8\u8c03\u6574<\/p>\n<p>&#8220;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;\u5230\u5e95\u662f\u600e\u4e48\u505a\u5230\u7684\uff1f\u5176\u5b9e\u5e76\u4e0d\u96be\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5728\u7f51\u9875\u4ee3\u7801\u7684\u5934\u90e8\uff0c\u52a0\u5165\u4e00\u884c<a class=\"content_a\" href=\"https:\/\/developer.mozilla.org\/en\/mobile\/viewport_meta_tag\" target=\"_blank\">viewport\u5143\u6807\u7b7e<\/a><br \/>\n\u3002<\/p>\n<pre lang=\"css\" colla=\"+\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/><\/pre>\n<p><a class=\"content_a\" href=\"https:\/\/developer.apple.com\/library\/ios\/\" target=\"_blank\">viewport<\/a><br \/>\n\u662f\u7f51\u9875\u9ed8\u8ba4\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\uff0c\u4e0a\u9762\u8fd9\u884c\u4ee3\u7801\u7684\u610f\u601d\u662f\uff0c\u7f51\u9875\u5bbd\u5ea6\u9ed8\u8ba4\u7b49\u4e8e\u5c4f\u5e55\u5bbd\u5ea6\uff08width=device-width\uff09\uff0c\u539f\u59cb\u7f29\u653e\u6bd4\u4f8b\uff08initial-scale=1\uff09\u4e3a1.0\uff0c\u5373\u7f51\u9875\u521d\u59cb\u5927\u5c0f\u5360\u5c4f\u5e55\u9762\u79ef\u7684100%\u3002<\/p>\n<p>\u6240\u6709\u4e3b\u6d41\u6d4f\u89c8\u5668\u90fd\u652f\u6301\u8fd9\u4e2a\u8bbe\u7f6e\uff0c\u5305\u62ecIE9\u3002\u5bf9\u4e8e\u90a3\u4e9b\u8001\u5f0f\u6d4f\u89c8\u5668\uff08\u4e3b\u8981\u662fIE6\u30017\u30018\uff09\uff0c\u9700\u8981\u4f7f\u7528<a class=\"content_a\" href=\"http:\/\/code.google.com\/p\/css3-mediaqueries-js\/\" target=\"_blank\">css3-mediaqueries.js<\/a>\u3002<\/p>\n<pre lang=\"javascript\" colla=\"+\"><!--[if lt IE 9]>\n\u3000\u3000\u3000\u3000<script src=\"http:\/\/css3-mediaqueries-js.googlecode.com\/svn\/trunk\/css3-mediaqueries.js\"><\/script>\n\u3000\u3000< ![endif]--><\/pre>\n<p class=\"artdir1\">\u4e09\u3001\u4e0d\u4f7f\u7528\u7edd\u5bf9\u5bbd\u5ea6<\/p>\n<p>\u7531\u4e8e\u7f51\u9875\u4f1a\u6839\u636e\u5c4f\u5e55\u5bbd\u5ea6\u8c03\u6574\u5e03\u5c40\uff0c\u6240\u4ee5\u4e0d\u80fd\u4f7f\u7528\u7edd\u5bf9\u5bbd\u5ea6\u7684\u5e03\u5c40\uff0c\u4e5f\u4e0d\u80fd\u4f7f\u7528\u5177\u6709\u7edd\u5bf9\u5bbd\u5ea6\u7684\u5143\u7d20\u3002\u8fd9\u4e00\u6761\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<p>\u5177\u4f53\u8bf4\uff0cCSS\u4ee3\u7801\u4e0d\u80fd\u6307\u5b9a\u50cf\u7d20\u5bbd\u5ea6\uff1a<\/p>\n<pre lang=\"css\" colla=\"+\">width:xxx px;<\/pre>\n<p>\u53ea\u80fd\u6307\u5b9a\u767e\u5206\u6bd4\u5bbd\u5ea6\uff1a<\/p>\n<pre lang=\"css\" colla=\"+\">width: xx%;<\/pre>\n<p>\u6216\u8005<\/p>\n<pre lang=\"css\" colla=\"+\">width:auto;<\/pre>\n<p class=\"artdir1\">\u56db\u3001\u76f8\u5bf9\u5927\u5c0f\u7684\u5b57\u4f53<\/p>\n<p>\u5b57\u4f53\u4e5f\u4e0d\u80fd\u4f7f\u7528\u7edd\u5bf9\u5927\u5c0f\uff08px\uff09\uff0c\u800c\u53ea\u80fd\u4f7f\u7528\u76f8\u5bf9\u5927\u5c0f\uff08em\uff09\u3002<\/p>\n<pre lang=\"css\" colla=\"+\">body {\n\u3000\u3000\u3000\u3000font: normal 100% Helvetica, Arial, sans-serif;\n\u3000\u3000}<\/pre>\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u6307\u5b9a\uff0c\u5b57\u4f53\u5927\u5c0f\u662f\u9875\u9762\u9ed8\u8ba4\u5927\u5c0f\u7684100%\uff0c\u537316\u50cf\u7d20\u3002<\/p>\n<pre lang=\"css\" colla=\"+\">h1 {\n\u3000\u3000\u3000\u3000font-size: 1.5em;\n\u3000\u3000}<\/pre>\n<p>\u7136\u540e\uff0ch1\u7684\u5927\u5c0f\u662f\u9ed8\u8ba4\u5927\u5c0f\u76841.5\u500d\uff0c\u537324\u50cf\u7d20\uff0824\/16=1.5\uff09\u3002<\/p>\n<pre lang=\"css\" colla=\"+\">small {\n    \u3000\u3000\u3000\u3000font-size: 0.875em;\n    \u3000\u3000}<\/pre>\n<p>small\u5143\u7d20\u7684\u5927\u5c0f\u662f\u9ed8\u8ba4\u5927\u5c0f\u76840.875\u500d\uff0c\u537314\u50cf\u7d20\uff0814\/16=0.875\uff09\u3002<\/p>\n<p>\u4e94\u3001\u6d41\u52a8\u5e03\u5c40\uff08fluid grid\uff09<br \/>\n<a class=\"content_a\" href=\"http:\/\/www.alistapart.com\/articles\/fluidgrids\/\" target=\"_blank\">&#8220;\u6d41\u52a8\u5e03\u5c40&#8221;<\/a><br \/>\n\u7684\u542b\u4e49\u662f\uff0c\u5404\u4e2a\u533a\u5757\u7684\u4f4d\u7f6e\u90fd\u662f\u6d6e\u52a8\u7684\uff0c\u4e0d\u662f\u56fa\u5b9a\u4e0d\u53d8\u7684\u3002<\/p>\n<pre lang=\"css\" colla=\"+\">.main {\n    \u3000\u3000\u3000\u3000float: right;\n    \u3000\u3000\u3000\u3000width: 70%;\n    \u3000\u3000}\n\n    \u3000\u3000.leftBar {\n    \u3000\u3000\u3000\u3000float: left;\n    \u3000\u3000\u3000\u3000width: 25%;\n    \u3000\u3000}<\/pre>\n<p>float\u7684\u597d\u5904\u662f\uff0c\u5982\u679c\u5bbd\u5ea6\u592a\u5c0f\uff0c\u653e\u4e0d\u4e0b\u4e24\u4e2a\u5143\u7d20\uff0c\u540e\u9762\u7684\u5143\u7d20\u4f1a\u81ea\u52a8\u6eda\u52a8\u5230\u524d\u9762\u5143\u7d20\u7684\u4e0b\u65b9\uff0c\u4e0d\u4f1a\u5728\u6c34\u5e73\u65b9\u5411overflow\uff08\u6ea2\u51fa\uff09\uff0c\u907f\u514d\u4e86\u6c34\u5e73\u6eda\u52a8\u6761\u7684\u51fa\u73b0\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u7edd\u5bf9\u5b9a\u4f4d\uff08position: absolute\uff09\u7684\u4f7f\u7528\uff0c\u4e5f\u8981\u975e\u5e38\u5c0f\u5fc3\u3002<\/p>\n<p class=\"artdir1\">\u516d\u3001\u9009\u62e9\u52a0\u8f7dCSS<\/p>\n<p>&#8220;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;\u7684\u6838\u5fc3\uff0c\u5c31\u662fCSS3\u5f15\u5165\u7684Media Query\u6a21\u5757\u3002<\/p>\n<p>\u5b83\u7684\u610f\u601d\u5c31\u662f\uff0c\u81ea\u52a8\u63a2\u6d4b\u5c4f\u5e55\u5bbd\u5ea6\uff0c\u7136\u540e\u52a0\u8f7d\u76f8\u5e94\u7684CSS\u6587\u4ef6\u3002<\/p>\n<pre lang=\"html\" colla=\"+\">\u3000<link rel=\"stylesheet\" type=\"text\/css\"\n\u3000\u3000\u3000\u3000media=\"screen and (max-device-width: 400px)\"\n\u3000\u3000\u3000\u3000href=\"tinyScreen.css\" \/><\/pre>\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u610f\u601d\u662f\uff0c\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5c0f\u4e8e400\u50cf\u7d20\uff08max-device-width: 400px\uff09\uff0c\u5c31\u52a0\u8f7dtinyScreen.css\u6587\u4ef6\u3002<\/p>\n<pre lang=\"html\" colla=\"+\"><link rel=\"stylesheet\" type=\"text\/css\"\n\u3000\u3000\u3000\u3000media=\"screen and (min-width: 400px) and (max-device-width: 600px)\"\n\u3000\u3000\u3000\u3000href=\"smallScreen.css\" \/><\/pre>\n<p>\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5728400\u50cf\u7d20\u5230600\u50cf\u7d20\u4e4b\u95f4\uff0c\u5219\u52a0\u8f7dsmallScreen.css\u6587\u4ef6\u3002<\/p>\n<p>\u9664\u4e86\u7528html\u6807\u7b7e\u52a0\u8f7dCSS\u6587\u4ef6\uff0c\u8fd8\u53ef\u4ee5\u5728\u73b0\u6709CSS\u6587\u4ef6\u4e2d\u52a0\u8f7d\u3002<\/p>\n<pre lang=\"css\" colla=\"+\">@import url(\"tinyScreen.css\") screen and (max-device-width: 400px);<\/pre>\n<p class=\"artdir1\">\u4e03\u3001CSS\u7684@media\u89c4\u5219<\/p>\n<p>\u540c\u4e00\u4e2aCSS\u6587\u4ef6\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u5c4f\u5e55\u5206\u8fa8\u7387\uff0c\u9009\u62e9\u5e94\u7528\u4e0d\u540c\u7684CSS\u89c4\u5219\u3002<\/p>\n<pre lang=\"css\" colla=\"+\">    \u3000\u3000\n@media screen and (max-device-width: 400px) {\n\n    \u3000\u3000\u3000\u3000.column {\n    \u3000\u3000\u3000\u3000\u3000\u3000float: none;\n    \u3000\u3000\u3000\u3000\u3000\u3000width:auto;\n    \u3000\u3000\u3000\u3000}\n\n    \u3000\u3000\u3000\u3000#sidebar {\n    \u3000\u3000\u3000\u3000\u3000\u3000display:none;\n    \u3000\u3000\u3000\u3000}\n\n    \u3000\u3000}<\/pre>\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u610f\u601d\u662f\uff0c\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5c0f\u4e8e400\u50cf\u7d20\uff0c\u5219column\u5757\u53d6\u6d88\u6d6e\u52a8\uff08float:none\uff09\u3001\u5bbd\u5ea6\u81ea\u52a8\u8c03\u8282\uff08width:auto\uff09\uff0csidebar\u5757\u4e0d\u663e\u793a\uff08display:none\uff09\u3002<\/p>\n<p class=\"artdir1\">\u516b\u3001\u56fe\u7247\u7684\u81ea\u9002\u5e94\uff08fluid image\uff09<\/p>\n<p>\u9664\u4e86\u5e03\u5c40\u548c\u6587\u672c\uff0c&#8221;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;\u8fd8\u5fc5\u987b\u5b9e\u73b0\u56fe\u7247\u7684\u81ea\u52a8\u7f29\u653e\u3002<\/p>\n<p>\u8fd9\u53ea\u8981\u4e00\u884cCSS\u4ee3\u7801\uff1a<\/p>\n<pre lang=\"css\" colla=\"+\">\u3000img { max-width: 100%;}<\/pre>\n<p>\u8fd9\u884c\u4ee3\u7801\u5bf9\u4e8e\u5927\u591a\u6570\u5d4c\u5165\u7f51\u9875\u7684\u89c6\u9891\u4e5f\u6709\u6548\uff0c\u6240\u4ee5\u53ef\u4ee5\u5199\u6210\uff1a<\/p>\n<pre lang=\"css\" colla=\"+\">\u3000\u3000img, object { max-width: 100%;}<\/pre>\n<p>\u8001\u7248\u672c\u7684IE\u4e0d\u652f\u6301max-width\uff0c\u6240\u4ee5\u53ea\u597d\u5199\u6210\uff1a<\/p>\n<pre lang=\"css\" colla=\"+\">\u3000\u3000img { width: 100%; }<\/pre>\n<p>\u6b64\u5916\uff0cwindows\u5e73\u53f0\u7f29\u653e\u56fe\u7247\u65f6\uff0c\u53ef\u80fd\u51fa\u73b0\u56fe\u50cf\u5931\u771f\u73b0\u8c61\u3002\u8fd9\u65f6\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528IE\u7684\u4e13\u6709\u547d\u4ee4\uff1a<\/p>\n<pre lang=\"css\" colla=\"+\">\u3000img { -ms-interpolation-mode: bicubic; }<\/pre>\n<p>\u6216\u8005\uff0cEthan Marcotte\u7684imgSizer.js\u3002<\/p>\n<pre lang=\"javascript\" colla=\"+\">\u3000addLoadEvent(function() {\n\n    \u3000\u3000\u3000\u3000var imgs = document.getElementById(\"content\").getElementsByTagName(\"img\");\n\n    \u3000\u3000\u3000\u3000imgSizer.collate(imgs);\n\n    \u3000\u3000});<\/pre>\n<p>\u4e0d\u8fc7\uff0c\u6709\u6761\u4ef6\u7684\u8bdd\uff0c\u6700\u597d\u8fd8\u662f\u6839\u636e\u4e0d\u540c\u5927\u5c0f\u7684\u5c4f\u5e55\uff0c\u52a0\u8f7d\u4e0d\u540c\u5206\u8fa8\u7387\u7684\u56fe\u7247\u3002\u6709\u5f88\u591a\u65b9\u6cd5\u53ef\u4ee5\u505a\u5230\u8fd9\u4e00\u6761\uff0c\u670d\u52a1\u5668\u7aef\u548c\u5ba2\u6237\u7aef\u90fd\u53ef\u4ee5\u5b9e\u73b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003: \u968f\u77403G\u7684\u666e\u53ca\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u4eba\u4f7f\u7528\u624b\u673a\u4e0a\u7f51\u3002 \u79fb\u52a8\u8bbe\u5907\u6b63\u8d85\u8fc7\u684c\u9762\u8bbe\u5907\uff0c\u6210\u4e3a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=2577\"> <span class=\"screen-reader-text\">[\u8f6c\u8f7d]\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1\uff08Responsive Web Design)<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/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":[296,325,456],"class_list":["post-2577","post","type-post","status-publish","format-standard","hentry","category-admin","tag-wp-tec","tag-325","tag-456"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/2577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2577"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/2577\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}