{"id":1229,"date":"2012-06-18T14:51:12","date_gmt":"2012-06-18T06:51:12","guid":{"rendered":"http:\/\/www.gaigaiming.com\/?p=1229"},"modified":"2012-06-18T14:51:12","modified_gmt":"2012-06-18T06:51:12","slug":"%e3%80%90%e8%bd%ac%e3%80%91%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%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.gaigaiming.com\/index.php\/2012\/06\/18\/%e3%80%90%e8%bd%ac%e3%80%91%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%ef%bc%89\/","title":{"rendered":"\u3010\u8f6c\u3011\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1\uff08Responsive Web Design\uff09"},"content":{"rendered":"<div class=\"pcs-article-box_ptkaiapt4bxy_baiduscarticle\">\n<div class=\"pcs-article-c_ptkaiapt4bxy_baiduscarticle\">\n<div id=\"detailArticleContent_ptkaiapt4bxy_baiduscarticle\" class=\"pcs-article-content_ptkaiapt4bxy_baiduscarticle\">\n<div><\/div>\n<div class=\"pcs-article-box_ptkaiapt4bxy_baiduscarticle\">\n<h1 id=\"detailArticleTitle_ptkaiapt4bxy_baiduscarticle\" class=\"pcs-article-title_ptkaiapt4bxy_baiduscarticle\"><\/h1>\n<div class=\"pcs-article-c_ptkaiapt4bxy_baiduscarticle\">\n<div id=\"detailArticleContent_ptkaiapt4bxy_baiduscarticle\" class=\"pcs-article-content_ptkaiapt4bxy_baiduscarticle\">\n<div>\n<div>\n<p>\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<\/div>\n<div>\n<p><img decoding=\"async\" src=\"http:\/\/image.beekka.com\/blog\/201205\/bg2012050101.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<\/p>\n<p>\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\u00a0\/\u00a0iPad\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:\/\/image.beekka.com\/blog\/201205\/bg2012050107.jpg\" alt=\"\" \/><\/p>\n<p><strong>\u4e00\u3001&#8221;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;\u7684\u6982\u5ff5<\/strong><\/p>\n<p>2010\u5e74\uff0cEthan\u00a0Marcotte\u63d0\u51fa\u4e86<a href=\"http:\/\/www.alistapart.com\/articles\/responsive-web-design\/\" target=\"_blank\" rel=\"noopener\">&#8220;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;<\/a>\uff08Responsive\u00a0Web\u00a0Design\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 href=\"http:\/\/www.alistapart.com\/d\/responsive-web-design\/ex\/ex-site-flexible.html\" target=\"_blank\" rel=\"noopener\">\u8303\u4f8b<\/a>\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:\/\/image.beekka.com\/blog\/201205\/bg2012050103.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:\/\/image.beekka.com\/blog\/201205\/bg2012050104.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:\/\/image.beekka.com\/blog\/201205\/bg2012050105.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:\/\/image.beekka.com\/blog\/201205\/bg2012050106.jpg\" alt=\"\" \/><\/p>\n<p><a href=\"http:\/\/mediaqueri.es\/\" target=\"_blank\" rel=\"noopener\">mediaqueri.es<\/a>\u4e0a\u9762\u6709\u66f4\u591a\u8fd9\u6837\u7684\u4f8b\u5b50\u3002<\/p>\n<p>\u8fd9\u91cc\u8fd8\u6709\u4e00\u4e2a<a href=\"http:\/\/www.benjaminkeen.com\/misc\/bricss\/\" target=\"_blank\" rel=\"noopener\">\u6d4b\u8bd5\u5c0f\u5de5\u5177<\/a>\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><strong>\u4e8c\u3001\u5141\u8bb8\u7f51\u9875\u5bbd\u5ea6\u81ea\u52a8\u8c03\u6574<\/strong><\/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 href=\"https:\/\/developer.mozilla.org\/en\/mobile\/viewport_meta_tag\" target=\"_blank\" rel=\"noopener\">viewport\u5143\u6807\u7b7e<\/a>\u3002<\/p>\n<blockquote><p>\u3000\u3000&lt;meta\u00a0name=&#8221;viewport&#8221;\u00a0content=&#8221;width=device-width,\u00a0initial-scale=1&#8243;\u00a0\/&gt;<\/p><\/blockquote>\n<p><a href=\"https:\/\/developer.apple.com\/library\/ios\/#DOCUMENTATION\/AppleApplications\/Reference\/SafariWebContent\/UsingtheViewport\/UsingtheViewport.html\" target=\"_blank\" rel=\"noopener\">viewport<\/a>\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 href=\"http:\/\/code.google.com\/p\/css3-mediaqueries-js\/\" target=\"_blank\" rel=\"noopener\">css3-mediaqueries.js<\/a>\u3002<\/p>\n<blockquote><p>\u3000\u3000&lt;!&#8211;[if\u00a0lt\u00a0IE\u00a09]&gt;<br \/>\n&lt;script\u00a0src=&#8221;http:\/\/css3-mediaqueries-js.googlecode.com\/svn\/trunk\/css3-mediaqueries.js&#8221;&gt;&lt;\/script&gt;<br \/>\n&lt;![endif]&#8211;&gt;<\/p><\/blockquote>\n<p><strong>\u4e09\u3001\u4e0d\u4f7f\u7528\u7edd\u5bf9\u5bbd\u5ea6<\/strong><\/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<blockquote><p>\u3000\u3000width:xxx\u00a0px;<\/p><\/blockquote>\n<p>\u53ea\u80fd\u6307\u5b9a\u767e\u5206\u6bd4\u5bbd\u5ea6\uff1a<\/p>\n<blockquote><p>\u3000\u3000width:\u00a0xx%;<\/p><\/blockquote>\n<p>\u6216\u8005<\/p>\n<blockquote><p>\u3000\u3000width:auto;<\/p><\/blockquote>\n<p><strong>\u56db\u3001\u76f8\u5bf9\u5927\u5c0f\u7684\u5b57\u4f53<\/strong><\/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<blockquote><p>\u3000\u3000body\u00a0{<br \/>\nfont:\u00a0normal\u00a0100%\u00a0Helvetica,\u00a0Arial,\u00a0sans-serif;<br \/>\n}<\/p><\/blockquote>\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<blockquote><p>\u3000\u3000h1\u00a0{<br \/>\nfont-size:\u00a01.5em;<br \/>\n}<\/p><\/blockquote>\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<blockquote><p>\u3000\u3000small\u00a0{<br \/>\nfont-size:\u00a00.875em;<br \/>\n}<\/p><\/blockquote>\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><strong>\u4e94\u3001\u6d41\u52a8\u5e03\u5c40\uff08fluid\u00a0grid\uff09<\/strong><\/p>\n<p><a href=\"http:\/\/www.alistapart.com\/articles\/fluidgrids\/\" target=\"_blank\" rel=\"noopener\">&#8220;\u6d41\u52a8\u5e03\u5c40&#8221;<\/a>\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<blockquote><p>\u3000\u3000.main\u00a0{<br \/>\nfloat:\u00a0right;<br \/>\nwidth:\u00a070%;<br \/>\n}<\/p>\n<p>.leftBar\u00a0{<br \/>\nfloat:\u00a0left;<br \/>\nwidth:\u00a025%;<br \/>\n}<\/p><\/blockquote>\n<p><a href=\"http:\/\/designshack.net\/articles\/css\/everything-you-never-knew-about-css-floats\/\" target=\"_blank\" rel=\"noopener\">float<\/a>\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:\u00a0absolute\uff09\u7684\u4f7f\u7528\uff0c\u4e5f\u8981\u975e\u5e38\u5c0f\u5fc3\u3002<\/p>\n<p><strong>\u516d\u3001\u9009\u62e9\u52a0\u8f7dCSS<\/strong><\/p>\n<p>&#8220;\u81ea\u9002\u5e94\u7f51\u9875\u8bbe\u8ba1&#8221;\u7684\u6838\u5fc3\uff0c\u5c31\u662fCSS3\u5f15\u5165\u7684<a href=\"http:\/\/www.w3.org\/TR\/CSS21\/media.html\" target=\"_blank\" rel=\"noopener\">Media\u00a0Query<\/a>\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<blockquote><p>\u3000\u3000&lt;link\u00a0rel=&#8221;stylesheet&#8221;\u00a0type=&#8221;text\/css&#8221;<br \/>\nmedia=&#8221;screen\u00a0and\u00a0(max-device-width:\u00a0400px)&#8221;<br \/>\nhref=&#8221;tinyScreen.css&#8221;\u00a0\/&gt;<\/p><\/blockquote>\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u610f\u601d\u662f\uff0c\u5982\u679c\u5c4f\u5e55\u5bbd\u5ea6\u5c0f\u4e8e400\u50cf\u7d20\uff08max-device-width:\u00a0400px\uff09\uff0c\u5c31\u52a0\u8f7dtinyScreen.css\u6587\u4ef6\u3002<\/p>\n<blockquote><p>\u3000\u3000&lt;link\u00a0rel=&#8221;stylesheet&#8221;\u00a0type=&#8221;text\/css&#8221;<br \/>\nmedia=&#8221;screen\u00a0and\u00a0(min-width:\u00a0400px)\u00a0and\u00a0(max-device-width:\u00a0600px)&#8221;<br \/>\nhref=&#8221;smallScreen.css&#8221;\u00a0\/&gt;<\/p><\/blockquote>\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<blockquote><p>\u3000\u3000@import\u00a0url(&#8220;tinyScreen.css&#8221;)\u00a0screen\u00a0and\u00a0(max-device-width:\u00a0400px);<\/p><\/blockquote>\n<p><strong>\u4e03\u3001CSS\u7684@media\u89c4\u5219<\/strong><\/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<blockquote><p>\u3000\u3000@media\u00a0screen\u00a0and\u00a0(max-device-width:\u00a0400px)\u00a0{<\/p>\n<p>.column\u00a0{<br \/>\nfloat:\u00a0none;<br \/>\nwidth:auto;<br \/>\n}<\/p>\n<p>#sidebar\u00a0{<br \/>\ndisplay:none;<br \/>\n}<\/p>\n<p>}<\/p><\/blockquote>\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><strong>\u516b\u3001\u56fe\u7247\u7684\u81ea\u9002\u5e94\uff08fluid\u00a0image\uff09<\/strong><\/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<a href=\"http:\/\/unstoppablerobotninja.com\/entry\/fluid-images\" target=\"_blank\" rel=\"noopener\">\u81ea\u52a8\u7f29\u653e<\/a>\u3002<\/p>\n<p>\u8fd9\u53ea\u8981\u4e00\u884cCSS\u4ee3\u7801\uff1a<\/p>\n<blockquote><p>\u3000\u3000img\u00a0{\u00a0max-width:\u00a0100%;}<\/p><\/blockquote>\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<blockquote><p>\u3000\u3000img,\u00a0object\u00a0{\u00a0max-width:\u00a0100%;}<\/p><\/blockquote>\n<p>\u8001\u7248\u672c\u7684IE\u4e0d\u652f\u6301max-width\uff0c\u6240\u4ee5\u53ea\u597d\u5199\u6210\uff1a<\/p>\n<blockquote><p>\u3000\u3000img\u00a0{\u00a0width:\u00a0100%;\u00a0}<\/p><\/blockquote>\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<a href=\"http:\/\/css-tricks.com\/ie-fix-bicubic-scaling-for-images\/\" target=\"_blank\" rel=\"noopener\">\u4e13\u6709\u547d\u4ee4<\/a>\uff1a<\/p>\n<blockquote><p>\u3000\u3000img\u00a0{\u00a0-ms-interpolation-mode:\u00a0bicubic;\u00a0}<\/p><\/blockquote>\n<p>\u6216\u8005\uff0cEthan\u00a0Marcotte\u7684<a href=\"http:\/\/unstoppablerobotninja.com\/demos\/resize\/imgSizer.js\" target=\"_blank\" rel=\"noopener\">imgSizer.js<\/a>\u3002<\/p>\n<blockquote><p>\u3000\u3000addLoadEvent(function()\u00a0{<\/p>\n<p>var\u00a0imgs\u00a0=\u00a0document.getElementById(&#8220;content&#8221;).getElementsByTagName(&#8220;img&#8221;);<\/p>\n<p>imgSizer.collate(imgs);<\/p>\n<p>});<\/p><\/blockquote>\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<a href=\"http:\/\/blog.cloudfour.com\/responsive-imgs-part-2\/\" target=\"_blank\" rel=\"noopener\">\u5f88\u591a\u65b9\u6cd5<\/a>\u53ef\u4ee5\u505a\u5230\u8fd9\u4e00\u6761\uff0c\u670d\u52a1\u5668\u7aef\u548c\u5ba2\u6237\u7aef\u90fd\u53ef\u4ee5\u5b9e\u73b0\u3002<\/p>\n<p><a href=\"http:\/\/www.ruanyifeng.com\/blog\/2012\/05\/responsive_web_design.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.ruanyifeng.com\/blog\/2012\/05\/responsive_web_design.html<\/a><\/p>\n<p><a href=\"http:\/\/blog.cloudfour.com\/responsive-imgs-part-2\/\" target=\"_blank\" rel=\"noopener\">http:\/\/blog.cloudfour.com\/responsive-imgs-part-2\/<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\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\u8bbf\u95ee\u4e92\u8054\u7f51\u7684\u6700\u5e38\u89c1\u7ec8\u7aef\u3002\u4e8e\u662f\uff0c\u7f51\u9875\u8bbe\u8ba1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1229","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/posts\/1229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/comments?post=1229"}],"version-history":[{"count":0,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/posts\/1229\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/media?parent=1229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/categories?post=1229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/tags?post=1229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}