{"id":172983,"date":"2020-03-08T09:00:15","date_gmt":"2020-03-08T01:00:15","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=172983"},"modified":"2020-02-27T14:55:30","modified_gmt":"2020-02-27T06:55:30","slug":"introduction-of-foundation","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/introduction-of-foundation.html","title":{"rendered":"Foundation \u8d77\u6b65\u4ecb\u7ecd"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nFoundation \u7528\u4e8e\u5f00\u53d1\u54cd\u5e94\u5f0f\u7684 HTML, CSS and JavaScript \u6846\u67b6\u3002
\nFoundation \u662f\u4e00\u4e2a\u6613\u7528\u3001\u5f3a\u5927\u800c\u4e14\u7075\u6d3b\u7684\u6846\u67b6,\u7528\u4e8e\u6784\u5efa\u57fa\u4e8e\u4efb\u4f55\u8bbe\u5907\u4e0a\u7684 Web \u5e94\u7528\u3002
\nFoundation \u662f\u4e00\u4e2a\u4ee5\u79fb\u52a8\u4f18\u5148\u7684\u6d41\u884c\u6846\u67b6\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u4ec0\u4e48\u662f Foundation\uff1f<\/strong><\/div>\n
    \n
  • Foundation \u662f\u4e00\u4e2a\u514d\u8d39\u7684\u524d\u7aef\u6846\u67b6\uff0c\u7528\u4e8e\u5feb\u901f\u5f00\u53d1\u3002<\/li>\n
  • Foundation \u5305\u542b\u4e86 HTML \u548c CSS \u7684\u8bbe\u8ba1\u6a21\u677f\uff0c\u63d0\u4f9b\u591a\u79cd Web \u4e0a\u7684 UI \u7ec4\u4ef6\uff0c\u5982\u8868\u5355\u3001\u6309\u94ae\u3001Tabs \u7b49\u7b49\u3002\u540c\u65f6\u4e5f\u63d0\u4f9b\u4e86\u591a\u79cd JavaScript \u63d2\u4ef6\u3002<\/li>\n
  • Foundation \u79fb\u52a8\u4f18\u5148\uff0c\u53ef\u521b\u5efa\u54cd\u5e94\u5f0f\u7f51\u9875\u3002<\/li>\n
  • Foundation \u9002\u7528\u4e8e\u521d\u5b66\u8005\u548c\u4e13\u4e1a\u4eba\u58eb\u3002<\/li>\n
  • Foundation \u5df2\u4f7f\u7528\u5728 Facebook, eBay, Samsung, Amazon, Disney\u7b49\u3002<\/li>\n<\/ul>\n

    \u4ec0\u4e48\u662f\u54cd\u5e94\u5f0f\u7f51\u9875\u8bbe\u8ba1\uff1f<\/strong><\/p>\n

    \u54cd\u5e94\u5f0fWeb\u8bbe\u8ba1(Responsive Web design)\u7684\u7406\u5ff5\u662f\uff1a \u9875\u9762\u7684\u8bbe\u8ba1\u4e0e\u5f00\u53d1\u5e94\u5f53\u6839\u636e\u7528\u6237\u884c\u4e3a\u4ee5\u53ca\u8bbe\u5907\u73af\u5883(\u7cfb\u7edf\u5e73\u53f0\u3001\u5c4f\u5e55\u5c3a\u5bf8\u3001\u5c4f\u5e55\u5b9a\u5411\u7b49)\u8fdb\u884c\u76f8\u5e94\u7684\u54cd\u5e94\u548c\u8c03\u6574\u3002<\/p>\n

    \u4ece\u54ea\u91cc\u4e0b\u8f7d Foundation?<\/strong><\/div>\n

    \u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4e24\u79cd\u65b9\u5f0f\u6765\u83b7\u53d6 Foundation\uff1a<\/p>\n

    1\u3001\u4ece\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\uff1ahttp:\/\/foundation.zurb.com\/\u3002<\/p>\n

    2\u3001\u4f7f\u7528\u83dc\u9e1f\u6559\u7a0b\u5b98\u7f51\u63d0\u4f9b\u7684CDN\uff08\u63a8\u8350\uff09\uff1a<\/p>\n

    <!-- css \u6587\u4ef6 --><\/span>\r\n<\/span><link<\/span> <\/span>rel<\/span>=<\/span>\"stylesheet\"<\/span> <\/span>href<\/span>=<\/span>\"http:\/\/cdn.static.runoob.com\/libs\/foundation\/5.5.3\/css\/foundation.min.css\"<\/span>><\/span>\r\n\r\n<\/span><!-- jQuery \u5e93 --><\/span>\r\n<\/span><script<\/span> <\/span>src<\/span>=<\/span>\"http:\/\/cdn.static.runoob.com\/libs\/jquery\/2.1.1\/jquery.min.js\"<\/span>><\/script><\/span>\r\n\r\n<\/span><!-- JavaScript \u6587\u4ef6 --><\/span>\r\n<\/span><script<\/span> <\/span>src<\/span>=<\/span>\"http:\/\/cdn.static.runoob.com\/libs\/foundation\/5.5.3\/js\/foundation.min.js\"<\/span>><\/script><\/span>\r\n\r\n<\/span><!-- modernizr.js \u6587\u4ef6 --><\/span>\r\n<\/span><script<\/span> <\/span>src<\/span>=<\/span>\"http:\/\/cdn.static.runoob.com\/libs\/foundation\/5.5.3\/js\/vendor\/modernizr.js\"<\/span>><\/script><\/span><\/pre>\n

    \u672c\u7ad9\u9759\u6001 CDN \u57fa\u4e8e\u963f\u91cc\u4e91\u670d\u52a1\u3002
    \nFoundation \u4f7f\u7528 CDN \u7684\u4f18\u52bf:<\/strong>
    \nFoundation \u4f7f\u7528 CDN \u63d0\u9ad8\u4e86\u4f01\u4e1a\u7ad9\u70b9(\u5c24\u5176\u542b\u6709\u5927\u91cf\u56fe\u7247\u548c\u9759\u6001\u9875\u9762\u7ad9\u70b9)\u7684\u8bbf\u95ee\u901f\u5ea6\uff0c\u5e76\u5927\u5927\u63d0\u9ad8\u4ee5\u4e0a\u6027\u8d28\u7ad9\u70b9\u7684\u7a33\u5b9a\u6027<\/p>\n

    \u4e3a\u4ec0\u4e48\u4f7f\u7528 modernizr?<\/strong>
    \nSome Foundation \u7684\u7ec4\u4ef6\u4f7f\u7528\u4e86\u6bd4\u8f83\u524d\u524d\u6cbf\u7684 HTML5 \u548c CSS3 \u7279\u6027\uff0c\u4f46\u4e0d\u662f\u6240\u6709\u6d4f\u89c8\u5668\u90fd\u652f\u6301\u3002 Modernizr \u662f\u4e00\u4e2a\u7528\u4e8e\u68c0\u6d4b\u7528\u6237\u6d4f\u89c8\u5668HTML5\u548cCSS3\u7279\u6027\u7684JavaScript\u5e93 - \u8ba9\u7ec4\u4ef6\u80fd\u5728\u6240\u6709\u6d4f\u89c8\u5668\u4e0a\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n

    \u4f7f\u7528 Foundation \u521b\u5efa\u9875\u9762<\/strong><\/div>\n
    1. \u6dfb\u52a0 HTML5 doctype<\/strong><\/span><\/div>\n

    Foundation \u4f7f\u7528 HTML \u5143\u7d20\u548c CSS \u5c5e\u6027\uff0c\u6240\u4ee5\u9700\u8981\u6dfb\u52a0 HTML5 doctype \u6587\u6863\u7c7b\u578b\u58f0\u660e\u3002<\/p>\n

    \u540c\u65f6\u6211\u4eec\u53ef\u4ee5\u8bbe\u7f6e\u6587\u6863\u7684\u8bed\u8a00\u5c5e\u6027 lang \u53ca\u5b57\u7b26\u7f16\u7801\uff1a<\/p>\n

    \r\n<<\/span>!DOCTYPE<\/span> html<\/span>><\/span>
    <<\/span>html<\/span> lang=<\/span>\"zh-cn\"<\/span>><\/span>
      <<\/span>head<\/span>><\/span>
        \r\n <<\/span>meta<\/span> charset=<\/span>\"utf-8\"<\/span>><\/span>
      <<\/span>\/head<\/span>><\/span>
    <<\/span>\/html<\/span>><\/span><\/pre>\n
    2. Foundation 5 \u79fb\u52a8\u4f18\u5148<\/strong><\/span><\/div>\n

    Foundation 5 \u4e3a\u79fb\u52a8\u8bbe\u5907\u7684\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u3002\u6846\u67b6\u7684\u6838\u5fc3\u662f\u79fb\u52a8\u4f18\u5148\u3002<\/p>\n

    \u4e3a\u4e86\u786e\u4fdd\u9875\u9762\u53ef\u81ea\u7531\u7f29\u653e\u53ef\u4ee5\u5728 title_temp \u5143\u7d20\u4e2d\u6dfb\u52a0\u4ee5\u4e0b \u6807\u7b7e:<\/p>\n

    \r\n<<\/span>meta<\/span> name=<\/span>\"viewport\"<\/span> content=<\/span>\"width=device-width, initial-scale=1\"<\/span>><\/span><\/pre>\n
      \n
    • width\uff1a\u63a7\u5236 viewport \u7684\u5927\u5c0f\uff0c\u53ef\u4ee5\u6307\u5b9a\u7684\u4e00\u4e2a\u503c\uff0c\u5982\u679c 600\uff0c\u6216\u8005\u7279\u6b8a\u7684\u503c\uff0c\u5982 device-width \u4e3a\u8bbe\u5907\u7684\u5bbd\u5ea6\uff08\u5355\u4f4d\u4e3a\u7f29\u653e\u4e3a 100% \u65f6\u7684 CSS \u7684\u50cf\u7d20\uff09\u3002<\/li>\n
    • \n

      initial-scale\uff1a\u521d\u59cb\u7f29\u653e\u6bd4\u4f8b\uff0c\u4e5f\u5373\u662f\u5f53\u9875\u9762\u7b2c\u4e00\u6b21 load \u7684\u65f6\u5019\u7f29\u653e\u6bd4\u4f8b\u3002<\/li>\n<\/ul>\n

      3. \u521d\u59cb\u5316\u7ec4\u4ef6<\/strong><\/span><\/div>\n

      \u4e00\u4e9b Foundation \u7ec4\u4ef6\u662f\u57fa\u4e8e jQuery \u5f00\u53d1\u7684\uff0c\u5982\uff1a\u6a21\u6001\u6846\u3001\u4e0b\u62c9\u83dc\u5355\u7b49\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u811a\u672c\u6765\u521d\u59cb\u5316\u7ec4\u4ef6\uff1a<\/p>\n

      \r\n  <<\/span>script<\/span>><\/span>
      $(document).ready(function() {
          \r\n $(document).foundation();
      })
      <<\/span>\/script<\/span>><\/span><\/pre>\n
      \u57fa\u672c Foundation \u9875\u9762<\/strong><\/div>\n

      \u5982\u4f55\u521b\u5efa\u4e00\u4e2a\u57fa\u672c\u7684 foundation \u9875\u9762:<\/p>\n

      Foundation \u5b9e\u4f8b<\/strong><\/p>\n

      <<\/span>div<\/span> <\/span>class<\/span>=<\/span>\"<\/span>row<\/span>\"<\/span>><\/span>\r\n  <\/span><<\/span>div<\/span> <\/span>class<\/span>=<\/span>\"<\/span>medium-12 columns<\/span>\"<\/span>><\/span>\r\n    <\/span><<\/span>div<\/span> <\/span>class<\/span>=<\/span>\"<\/span>panel<\/span>\"<\/span>><\/span>\r\n      <\/span><<\/span>h1<\/span>><\/span>Foundation \u9875\u9762<\/span><\/<\/span>h1<\/span>><\/span>\r\n      <\/span><<\/span>p<\/span>><\/span>\u91cd\u7f6e\u7a97\u53e3\u5927\u5c0f\uff0c\u67e5\u770b\u6548\u679c\uff01<\/span><\/<\/span>p<\/span>><\/span>\r\n      <\/span><<\/span>button<\/span> <\/span>type<\/span>=<\/span>\"<\/span>button<\/span>\"<\/span> <\/span>class<\/span>=<\/span>\"<\/span>button small<\/span>\"<\/span>><\/span>\u6211\u662f\u6309\u94ae!<\/span><\/<\/span>button<\/span>><\/span>\r\n    <\/span><\/<\/span>div<\/span>><\/span>\r\n  <\/span><\/<\/span>div<\/span>><\/span>\r\n<\/span><\/<\/span>div<\/span>><\/span>\r\n \r\n<\/span><<\/span>div<\/span> <\/span>class<\/span>=<\/span>\"<\/span>row<\/span>\"<\/span>><\/span>\r\n  <\/span><<\/span>div<\/span> <\/span>class<\/span>=<\/span>\"<\/span>medium-4 columns<\/span>\"<\/span>><\/span>\r\n    <\/span><<\/span>h3<\/span>><\/span>\u83dc\u9e1f\u6559\u7a0b<\/span><\/<\/span>h3<\/span>><\/span>\r\n    <\/span><<\/span>p<\/span>><\/span>\u5b66\u7684\u4e0d\u4ec5\u662f\u6280\u672f\uff0c\u66f4\u662f\u68a6\u60f3\uff01\uff01\uff01<\/span><\/<\/span>p<\/span>><\/span>\r\n  <\/span><\/<\/span>div<\/span>><\/span>\r\n  <\/span><<\/span>div<\/span> <\/span>class<\/span>=<\/span>\"<\/span>medium-4 columns<\/span>\"<\/span>><\/span>\r\n    <\/span><<\/span>h3<\/span>><\/span>\u83dc\u9e1f\u6559\u7a0b<\/span><\/<\/span>h3<\/span>><\/span>\r\n    <\/span><<\/span>p<\/span>><\/span>\u5b66\u7684\u4e0d\u4ec5\u662f\u6280\u672f\uff0c\u66f4\u662f\u68a6\u60f3\uff01\uff01\uff01<\/span><\/<\/span>p<\/span>><\/span>\r\n  <\/span><\/<\/span>div<\/span>><\/span>\r\n  <\/span><<\/span>div<\/span> <\/span>class<\/span>=<\/span>\"<\/span>medium-4 columns<\/span>\"<\/span>><\/span>\r\n    <\/span><<\/span>h3<\/span>><\/span>\u83dc\u9e1f\u6559\u7a0b<\/span><\/<\/span>h3<\/span>><\/span>\r\n    <\/span><<\/span>p<\/span>><\/span>\u5b66\u7684\u4e0d\u4ec5\u662f\u6280\u672f\uff0c\u66f4\u662f\u68a6\u60f3\uff01\uff01\uff01<\/span><\/<\/span>p<\/span>><\/span>\r\n  <\/span><\/<\/span>div<\/span>><\/span>\r\n<\/span><\/<\/span>div<\/span>><\/span>\r\n<\/pre>\n

      <\/head><\/p>\n","protected":false},"excerpt":{"rendered":"

      Foundation \u662f\u4e00\u4e2a\u514d\u8d39\u7684\u524d\u7aef\u6846\u67b6\uff0c\u7528\u4e8e\u5feb\u901f\u5f00\u53d1\u3002 Foundation \u5305\u542b\u4e86 HTML \u548c CSS […]<\/p>\n","protected":false},"author":321,"featured_media":172995,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-172983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/172983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/321"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=172983"}],"version-history":[{"count":7,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/172983\/revisions"}],"predecessor-version":[{"id":173433,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/172983\/revisions\/173433"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/172995"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=172983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=172983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=172983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}