{"id":122,"date":"2016-09-19T14:22:58","date_gmt":"2016-09-19T06:22:58","guid":{"rendered":"http:\/\/blog.xrhoujie.com\/?p=122"},"modified":"2017-07-31T17:14:56","modified_gmt":"2017-07-31T09:14:56","slug":"prefixfree-js%e8%ae%a9%e7%a7%81%e6%9c%89%e5%b1%9e%e6%80%a7-webkit-moz-%ef%bc%8c%e8%a7%81%e9%ac%bc%e5%8e%bb%e5%90%a7","status":"publish","type":"post","link":"http:\/\/blog.xrhoujie.com\/?p=122","title":{"rendered":"Prefixfree.js,\u8ba9\u79c1\u6709\u5c5e\u6027 -webkit-,-moz-\uff0c\u89c1\u9b3c\u53bb\u5427"},"content":{"rendered":"<div class=\"blog-abstract\">\u6458\u8981: \u719f\u8bdd\u8bf4\uff0c\u4e0d\u5403\u8461\u8404\u4e0d\u77e5\u8461\u8404\u9178\uff0c\u6ca1\u7528\u8fc7\u6ca1\u6709\u53d1\u8a00\u529d\uff0c\u6628\u5929\u7528Prefixfree.js\u5f00\u53d1\u4e86\u9879\u76ee\uff0c\u4eca\u5929\u8ddf\u5927\u5bb6\u5206\u4eab\u4e00\u4e0b\u4f7f\u7528\u5fc3\u5f97\uff01<\/div>\n<div id=\"blogBody\" class=\"blog-body\">\n<div class=\"BlogContent\">\n<p>\u4f17\u6240\u5468\u77e5\uff0c\u5728\u6211\u4eec\u5199CSS\u7684\u65f6\u5019\u4f1a\u9047\u5230\u4e00\u4e9b\u5c0f\u95ee\u9898\u6bd4\u5982\u4ee5\u4e0b\u8fd9\u6837<\/p>\n<pre class=\"hljs css\"><code class=\"language-css hljs\"><span class=\"hljs-selector-class\">.boxshadow<\/span> <span class=\"hljs-selector-id\">#c<\/span> {\r\n  \t<span class=\"hljs-attribute\">border<\/span>:none;\r\n  \t<span class=\"hljs-attribute\">-webkit-box-shadow<\/span>: <span class=\"hljs-built_in\">rgba<\/span>(0,0,0, .5) <span class=\"hljs-number\">3px<\/span> <span class=\"hljs-number\">3px<\/span> <span class=\"hljs-number\">6px<\/span>;\r\n  \t<span class=\"hljs-attribute\">-moz-box-shadow<\/span>: <span class=\"hljs-built_in\">rgba<\/span>(0,0,0, .5) <span class=\"hljs-number\">3px<\/span> <span class=\"hljs-number\">3px<\/span> <span class=\"hljs-number\">6px<\/span>;\r\n  \t<span class=\"hljs-attribute\">box-shadow<\/span>: <span class=\"hljs-built_in\">rgba<\/span>(0,0,0, .5) <span class=\"hljs-number\">3px<\/span> <span class=\"hljs-number\">3px<\/span> <span class=\"hljs-number\">6px<\/span>;  \r\n}<\/code><\/pre>\n<p>\u8fd8\u6709\u8fd9\u6837<\/p>\n<pre class=\"hljs css\"><code class=\"language-css hljs\"> <span class=\"hljs-selector-id\">#wrap<\/span>{\r\n         <span class=\"hljs-attribute\">border<\/span>: <span class=\"hljs-number\">5px<\/span> solid red;\r\n  \t<span class=\"hljs-attribute\">-webkit-border-radius<\/span>: <span class=\"hljs-number\">12px<\/span>;\r\n  \t<span class=\"hljs-attribute\">-moz-border-radius<\/span>: <span class=\"hljs-number\">12px<\/span>;\r\n  \t<span class=\"hljs-attribute\">border-radius<\/span>: <span class=\"hljs-number\">12px<\/span>;  \r\n}  <\/code><\/pre>\n<p>\u8bf7\u5927\u5bb6\u6ce8\u610f\u8fd9\u91cc\u9762\u7684-webkit-\u00a0 -moz-\uff0c\u8fd9\u4e9b\u90fd\u662f\u65e9\u5e74\u9057\u7559\u4e0b\u6765\u7684CSS\u79c1\u6709\u517c\u5bb9\u6027\u5199\u6cd5(\u8bdd\u8bf4\u90fd\u662f\u597d\u4e45\u4ee5\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u7684\u90a3\u4e00\u5957\u4e1c\u897f),\u53ef\u80fd\u8bf8\u4f4d\u524d\u7aefer~ \u65e9\u5df2\u7ecf\u4e60\u60ef\u4e86 \u8fd9\u79cd&#8221;\u76d6\u9ad8\u697c&#8221; \u8bdd\u8bf4\u8fd9\u79cd\u76d6\u9ad8\u697c\u53ef\u4e0d\u662f\u4ec0\u4e48\u597d\u4e8b\u513f\uff0c\u5f88XX\u7684\u4e00\u4e2a\u4e3e\u52a8\uff0c\u4e0d\u5efa\u8bae\u5927\u5bb6\u6bd4\u8fd9\u4e2a\u4e1c\u897f\uff0c\uff0c\uff0c\uff0c<\/p>\n<p>&nbsp;<\/p>\n<p>\u56de\u5230\u6b63\u9898\uff0c\u4eca\u5929\u7ed9\u5927\u5bb6\u9686\u91cd\u4ecb\u7ecdPrefixfree.js\uff0c\u6ca1\u9519\u5c31\u662f\u4ed6\uff0c\u901a\u8fc7\u5b83\u53ef\u4ee5\u8ba9\u4f60\u62dc\u6258\u76d6\u9ad8\u697c\u7684\u56f0\u6270\uff0c \u5047\u5982\u4f60\u73b0\u5728\u6b63\u5b66\u4e60\u7740\u5f3a\u5927\u7684Css3\uff0c\u4f60\u77e5\u9053Css3\u7684\u5f88\u591a\u6570\u5c5e\u6027\u4e3a\u5b9e\u9a8c\u5c5e\u6027\uff0c\u4f7f\u7528\u4ed6\u4eec\u7684\u65f6\u5019\u5f97\u52a0\u4e0a\u5404\u5f0f\u5404\u6837\u7684\u6d4f\u89c8\u5668\u524d\u7f00\u3002\u53ef\u80fd\u4f60\u9ed8\u9ed8\u5fcd\u53d7\u4e86\uff0c\u56e0\u4e3a\u8fd8\u6ca1\u5230\u7edf \u4e00\u7684\u65f6\u95f4\u3002\u6709\u6ca1\u60f3\u8fc7\u7ed9\u81ea\u5df1\u51cf\u4e0b\u8d1f\uff0c\u5076\u7136\u95f4\u5728\u7f51\u4e0a\u770b\u5230\u4e00\u4e2ajs\u89e3\u51b3\u65b9\u6848\uff0c\u6b63\u597d\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u4ed6\u4f1a\u5e2e\u4f60\u81ea\u52a8\u8bc6\u522b\u6d4f\u89c8\u5668\uff0c\u751f\u6210\u5bf9\u5e94\u7684Css3\u6837\u5f0f\u524d\u7f00\uff0c\u8fd9\u6837 \u4f60\u5c31\u53ef\u4ee5\u76f4\u63a5\u5f53\u4f5c\u6807\u51c6\u5c5e\u6027\u6765\u4f7f\u7528\u4e86\u3002\uff0c\u662f\u4e0d\u662f\u611f\u89c9\u5f88\u9177\u70ab\uff01\uff01\uff01<\/p>\n<p>\u200b<\/p>\n<pre class=\"hljs scss\"><code class=\"hljs scss\">-webkit-<span class=\"hljs-attribute\">transform<\/span>: rotate(<span class=\"hljs-number\">15deg<\/span>);\r\n\r\n-o-<span class=\"hljs-attribute\">transform<\/span>: rotate(<span class=\"hljs-number\">15deg<\/span>);\r\n\r\n-moz-<span class=\"hljs-attribute\">transform<\/span>: rotate(<span class=\"hljs-number\">15deg<\/span>);\r\n\r\n-ms-<span class=\"hljs-attribute\">transform<\/span>: rotate(<span class=\"hljs-number\">15deg<\/span>);\r\n\r\n-webkit-<span class=\"hljs-attribute\">border-radius<\/span>: <span class=\"hljs-number\">50%<\/span>;\r\n\r\n-o-<span class=\"hljs-attribute\">border-radius<\/span>: <span class=\"hljs-number\">50%<\/span>;\r\n\r\n-moz-<span class=\"hljs-attribute\">border-radius<\/span>: <span class=\"hljs-number\">50%<\/span>;\r\n\r\n-ms-<span class=\"hljs-attribute\">border-radius<\/span>: <span class=\"hljs-number\">50%<\/span>;<\/code><\/pre>\n<p>\u200b\u8fd9\u4e9b\u4e1c\u897f\uff0c\u901a\u8fc7prefixfree.js\u68c0\u6d4b\u540e \u4f60\u53ea\u9700\u8981\u5199\u6210\u8fd9\u6837<\/p>\n<p>transform:rotate(15deg);<\/p>\n<p>border-radius:50%;<\/p>\n<p>\u6ca1\u4e86 \uff0c\u5c31\u8fd9\u6837\uff0c\u5373\u7b80\u5355 \u53c8\u7c97\u66b4\uff0c\u53ef\u80fd\u4f60\u73b0\u5728\u5df2\u7ecf\u5fcd\u4e0d\u4f4f\u60f3\u8981\u5f15\u5165\u4e86 \uff0c<\/p>\n<p>\u6700\u65b0\u7248\u672c\u7684\u4e0b\u8f7d\u5730\u5740\u5728\u8fd9\u91cc <a href=\"http:\/\/www.bootcdn.cn\/prefixfree\/\" rel=\"nofollow\">http:\/\/www.bootcdn.cn\/prefixfree\/<\/a><\/p>\n<p><img loading=\"lazy\" src=\"http:\/\/static.oschina.net\/uploads\/space\/2016\/0730\/164019_MgbC_2760473.png\" alt=\"\" width=\"709\" height=\"597\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u8fd9\u662f\u6700\u8fd1\u5f00\u53d1\u7684\u4e00\u4e2a\u9879\u76ee\uff0c\u521a\u521a\u597d\u7528\u5230\uff0c\u5e0c\u671b\u7ed9\u5927\u5bb6\u505a\u4e00\u4e2a\u53c2\u8003\uff0c\u6700\u540e\u63d0\u51e0\u4e2a\u5c0f\u5efa\u8bae<\/p>\n<p>&nbsp;<\/p>\n<p>\u4e8b\u7269\u603b\u662f\u6709\u4e24\u9762\u6027\uff0c\u5e26\u6765\u65b9\u4fbf\u7684\u540c\u65f6\uff0c\u4e5f\u5f15\u5165\u4e86\u4e00\u4e9b\u95ee\u9898\uff0c<\/p>\n<p>1.\u56e0\u4e3a\u662f\u57fa\u4e8ejs\u7684\uff0c\u6240\u4ee5\u5bf9\u4e8e\u4e00\u4e9b\u4e0d\u652f\u6301\u6216\u8005\u7981\u7528js\u7684\u6d4f\u89c8\u5668\u7528\u6237\u662f\u5f88\u4e0d\u53cb\u597d\u7684\uff0c\u5f88\u53ef\u80fd\u4f1a\u6253\u4e71\u5e03\u5c40\uff0c<\/p>\n<p>2.\u6709\u65f6\u5019\u4f1a\u5f71\u54cd\u4f60\u4f7f\u7528Css\u7684\u4e00\u4e9b\u6280\u5de7\uff08\u6bd4\u5982\u4f60\u53ea\u662f\u60f3\u9488\u5bf9\u67d0\u4e2a\u6d4f\u89c8\u5668\u4f7f\u7528\u67d0\u4e2aCss3\u5c5e\u6027\uff0c\u7531\u4e8e\u8fd9\u4e2ajs\u7684\u4f5c\u7528\uff0c\u6240\u6709\u6d4f\u89c8\u5668\u90fd\u4f1a\u5e94\u7528\u8be5\u6761\u5c5e\u6027\uff0c\u660e\u663e\u8fd9\u4e0d \u662f\u4f60\u60f3\u8981\u7684\u7ed3\u679c\uff09<\/p>\n<p>\u6839\u636e\u946b\u5927\u795e\u8bf4\u7684\u8fd8\u6709\u51e0\u70b9\u9650\u5236\uff1a<\/p>\n<ol>\n<li>@import-ed\u4e4b\u7c7b\u6587\u4ef6\u4e0d\u9e1f<\/li>\n<li>\u8de8\u57df\u94fe\u63a5\u6837\u5f0f\u4e0d\u9e1f<\/li>\n<li>\u65e0\u524d\u7f00\u94fe\u63a5\u6837\u5f0fChrome\u548cOpera\u4e0b\u90e8\u5206\u4e0d\u9e1f<\/li>\n<li>\u884c\u5185style\u65e0\u524d\u7f00\u503c\u5728IE\u548cFireFox3.6\u4ee5\u4e0b\u4e0d\u9e1f\uff0cFireFox 3.6\u4e0b\u7684\u5c5e\u6027\u4ea6\u5982\u6b64<\/li>\n<\/ol>\n<p>\u603b\u7ed3\u4e00\u4e0b\uff1a\u8fd9\u4e2a\u4e1c\u897f\u597d\u662f\u597d\uff0c\u4f46\u662f\u8def\u8fd8\u662f\u8981\u81ea\u5df1\u6162\u6162\u8d70\uff0c\u8981\u4e00\u6b65\u4e00\u4e2a\u811a\u5370\uff0c\u5728\u5b66\u4e60\u8d70\u8def\u7684\u65f6\u5019\u5c31\u8dd1\u8d77\u6765\uff0c\u4ee5\u540e\u7684\u8def\u5c31\u4f1a\u66f4\u52a0\u96be\u8d70<\/p>\n<p>\u6700\u540e\u611f\u8c22\u946b\u5927\u795e\u7684\u5f00\u6e90\u6587\u7ae0\uff0c\u7ed9\u4e86\u6211\u7075\u611f<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981: \u719f\u8bdd\u8bf4\uff0c\u4e0d\u5403\u8461\u8404\u4e0d\u77e5\u8461\u8404\u9178\uff0c\u6ca1\u7528\u8fc7\u6ca1\u6709\u53d1\u8a00\u529d\uff0c\u6628\u5929\u7528Prefixfree.js\u5f00\u53d1\u4e86\u9879\u76ee\uff0c\u4eca\u5929\u8ddf\u5927\u5bb6\u5206 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[19],"_links":{"self":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/122"}],"collection":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":1,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":123,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions\/123"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=\/wp\/v2\/media\/138"}],"wp:attachment":[{"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.xrhoujie.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}