{"id":4571,"date":"2015-02-05T16:18:50","date_gmt":"2015-02-05T08:18:50","guid":{"rendered":"http:\/\/www.zhangxinxu.com\/wordpress\/?p=4571"},"modified":"2019-04-26T19:20:40","modified_gmt":"2019-04-26T11:20:40","slug":"image-local-blur-background-attachment-fixed","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2015\/02\/image-local-blur-background-attachment-fixed\/","title":{"rendered":"\u56fe\u7247\u52a8\u6001\u5c40\u90e8\u6bdb\u73bb\u7483\u6a21\u7cca\u6548\u679c\u7684\u5b9e\u73b0"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/\">https:\/\/www.zhangxinxu.com<\/a><br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=4571\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=4571<\/a><\/p>\n<h3>\u4e00\u3001\u6548\u679c\u5148\u884c<\/h3>\n<p>\u5982\u4e0b\uff08webkit\/blink\u5185\u6838\u6d4f\u89c8\u5668\u6548\u679c\u53ef\u89c1\uff09\uff08\u5de6\u4e0a\u89d2100*100\u65b9\u5757\u53ef\u62d6\u52a8\uff09\uff1a<br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.zhangxinxu.com\/study\/201502\/include-drag.html\" frameborder=\"0\" width=\"256\" height=\"191\" class=\"mt10\"><\/iframe><\/p>\n<h3>\u4e8c\u3001\u5b9e\u73b0\u539f\u7406<\/h3>\n<p>\u53c2\u89c1\u4e0b\u56fe\u793a\u610f\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201801\/2018-01-03_002549.png\" width=\"350\" height=\"231\" alt=\"\u4e0a\u9762\u6a21\u7cca\uff0c\u4e0b\u9762\u6e05\u695a\" class=\"alignnone\" \/><\/p>\n<p>\u539f\u7406\u5f88\u7b80\u5355\uff0c\u4e0b\u9762\u662f\u6b63\u5e38\u56fe\u7247\uff0c\u4e0a\u9762\u662f\u5c40\u90e8\u56fe\u7247\uff0c\u7136\u540e\u6a21\u7cca\uff0c\u5c31\u6709\u4e86\u5c40\u90e8\u6a21\u7cca\u6548\u679c\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u672c\u6587\u7ed3\u675f\uff0c\u6536\u5de5\u56de\u5e9c\uff01<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/210.gif\" align=\"absmiddle\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201502\/buhoudao.jpg\" width=\"261\" height=\"200\" alt=\"\u5c14\u5eb7\u53d1\u98d9\u4e86\uff01\" class=\"alignnone\" \/><\/p>\n<p>\u6211\u52d2\u4e2a\u64e6\uff0c\u5047\u5c14\u5eb7\u5f20\u76ca\u8fbe\u5a36\u4e86\u5c0f\u71d5\u5b50\u674e\u665f\uff0c\u8001\u5c14\u5eb7\u53d1\u98d9\u4e86\uff01\u770b\u6765\u8981\u591a\u8bf4\u70b9\u4e1c\u897f~~ <img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/98.gif\" align=\"absmiddle\"><\/p>\n<h3>\u4e09\u3001\u6a21\u7cca\u7684\u5b9e\u73b0<\/h3>\n<p>\u8981\u60f3\u5b9e\u73b0\u56fe\u7247\u6a21\u7cca\u6548\u679c\uff0c\u65b9\u6cd5\u5f88\u591a\uff0c\u501f\u52a9\u5185\u8054SVG\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6240\u6709\u6d4f\u89c8\u5668\u7684\u5168\u517c\u5bb9\uff0c\u53ef\u4ee5\u53c2\u800313\u5e74\u5199\u7684\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=3804\">\u4f7f\u7528CSS\u5c06\u56fe\u7247\u8f6c\u6362\u6210\u6a21\u7cca(\u6bdb\u73bb\u7483)\u6548\u679c<\/a>\u201d\u4e00\u6587\u3002\u4e0b\u9762\u793a\u4f8b\uff0c\u5982\u679c\u6ca1\u6709\u8bf4\u660e\uff0c\u90fd\u662f\u76f4\u63a5\u4f7f\u7528CSS3 filter\u6ee4\u955c\u5c5e\u6027\uff0c\u56e0\u6b64\uff0c\u5efa\u8baeChrome\u7b49\u6d4f\u89c8\u5668\u56f4\u89c2\u3002<\/p>\n<div class=\"zxx_code\">\n<pre>img { -webkit-filter: blur(5px); filter: blur(5px); }<\/pre>\n<\/div>\n<p><span class=\"s\">\/\/zxx: \u517c\u5bb9\u5b9e\u73b0\u53ef\u4ee5\u53c2\u89c1\u672c\u6587\u6700\u540e\u7684\u9762\u5411\u5b9e\u9645\u5f00\u53d1\u7684\u7efc\u5408\u5b9e\u4f8b\u6f14\u793a\u3002<\/span><\/p>\n<h3>\u56db\u3001\u6a21\u7cca\u5c42\u4e0e\u80cc\u666f\u7684\u5b8c\u7f8e\u5339\u5bf9-JS\u504f\u79fb\u8ba1\u7b97<\/h3>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u4e0a\u9762\u7684100*100\u5927\u5c0f\u7684\u6a21\u7cca\u65b9\u5757\u8ddf\u540e\u9762\u7684\u59b9\u5b50\u662f\u91cd\u5408\u7684\uff0c\u611f\u89c9\u5c31\u662f\uff0c\u62d6\u5230\u4e86\u54ea\u91cc\uff0c\u59b9\u5b50\u5c31\u6a21\u7cca\u5230\u4e86\u54ea\u91cc\u3002<\/p>\n<p>\u90a3\uff0c\u5982\u4f55\u4e0a\u9762\u7684\u8986\u76d6\u7684\u548c\u4e0b\u9762\u7684\u539f\u59cb\u56fe\u7247match\u5462\uff1f<\/p>\n<p>\u9996\u5148\uff0c\u4e24\u4e2a\u5c42\u7684\u80cc\u666f\u56fe\u7247\u8981\u662f\u4e00\u6837\u7684\uff0c\u4e8e\u662f\uff0c\u5047\u8bbeHTML\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>&lt;div class=\"box\">\r\n    &lt;div id=\"drag\" class=\"drag\">&lt;\/div>\r\n&lt;\/div><\/pre>\n<\/div>\n<p>\u5219\uff0c\u5185\u5916\u4e24\u4e2a<code>div<\/code>\u80cc\u666f\u56fe\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>.box {  \r\n    background: url(mm1.jpg) no-repeat; \r\n}\r\n.drag { \r\n    background: inherit; \r\n}<\/pre>\n<\/div>\n<p><code>inherit<\/code>\u7ee7\u627f\u662f\u4e2a\u597d\u4e1c\u897f\uff0c\u5982\u679c\u4f60\u7684\u9879\u76ee\u4e0d\u7528\u7ba1IE6\/IE7, \u53ef\u4ee5\u591a\u7528\u7528\u8be5\u5173\u952e\u5b57\uff0c\u4f1a\u53d1\u73b0\u5f88\u591a\u5f00\u5fc3\u7684\u5730\u65b9\u7684\u3002\u7136\u800c\uff0c\u5f88\u591a\u5c0f\u4f19\u4f34\u53ef\u80fd\u8bb0\u4e0d\u4f4f\u8fd9\u4e2a\u5355\u8bcd\u3002\u5be1\u4eba\u6709\u4e2a\u90aa\u6076\u8bb0\u6cd5\uff0c\u4fdd\u8bc1\u5927\u5bb6\u8fc7\u76ee\u4e0d\u5fd8\u3002inherit\u62c6\u6210 in-her-it, \u610f\u601d\u662f\u201c\u5728\u5979\u7684\u5b83\u90a3\u4e2a\u91cc\u9762\u201d\u3002<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/6.gif\" align=\"absmiddle\"><\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a class=\"a_link\" target=\"_blank\" href=\"http:\/\/www.zhangxinxu.com\/study\/201502\/image-local-blur-by-js-calculation.html\">\u56fe\u7247\u7684\u5c40\u90e8\u9ad8\u65af\u6a21\u7cca\u6548\u679c-JS\u504f\u79fb\u8ba1\u7b97demo<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201801\/2018-01-03_001536.jpg\" width=\"256\" height=\"191\" alt=\"\u62d6\u62fd\u59b9\u5b50\u52a8\u6001\u6a21\u7cca\u622a\u56fe\" class=\"alignnone\" \/><\/p>\n<p>\u62d6\u62fd\u65b9\u6cd5\u7528\u7684\u662f\u62115\u5e74\u524d\uff0cJS\u5b66\u4e60\u8d77\u6b65\u90a3\u4f1a\u513f\u5199\u7684\u4e2a<code>startDrag(bar, target)<\/code>\u65b9\u6cd5\uff0c\u6587\u7ae0\u89c1\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=683\">JavaScript\u5b9e\u73b0\u6700\u7b80\u5355\u7684\u62d6\u62fd\u6548\u679c<\/a>\u201d\uff0c\u771f\u7684\u5c31\u662f\u5f88\u7eaf\u7684\u62d6\u62fd\u529f\u80fd\uff0c\u5f88\u9002\u5408\u8fd9\u91cc\u7684demo\uff0c\u7136\u540e\u81ea\u5df1\u52a0\u4e86\u4e2a\u56de\u8c03\uff0c\u52a8\u6001\u504f\u79fb<code>.drag<\/code>\u5143\u7d20\u80cc\u666f\u56fe\u7247\u7684<code>background-position<\/code>\u4f4d\u7f6e\uff0c\u4f7f\u5176\u4e00\u76f4\u4e0e\u80cc\u666f\u56fe\u7247\u6b63\u597d\u91cd\u5408\u3002<\/p>\n<div class=\"zxx_code\">\n<pre>var eleDrag = document.getElementById(\"drag\");\r\nif (eleDrag) {\r\n    startDrag(eleDrag, eleDrag, function(x, y) {\r\n        <span style=\"color:#cd0000;\">eleDrag.style.backgroundPosition<\/span> = (-1 * x) + \"px \" + (-1 * y) + \"px\";    \r\n    });\r\n}<\/pre>\n<\/div>\n<p>\u6548\u679c\u5373\u8fbe\u6210\uff01<\/p>\n<h3>\u4e94\u3001\u6a21\u7cca\u5c42\u4e0e\u80cc\u666f\u7684\u5b8c\u7f8e\u5339\u5bf9-CSS background-attachment:fixed\u81ea\u52a8<\/h3>\n<p>CSS <code>background-attachment:fixed<\/code>\u662f\u4e2a\u5f88\u6709\u4e2a\u6027\u7684\u58f0\u660e\u3002\u5e94\u7528\u4e86\u8be5\u58f0\u660e\u7684\u80cc\u666f\u56fe\u7247\uff0c\u65e0\u8bba\u4f60\u600e\u4e48\u79fb\u52a8\uff0c\u80cc\u666f\u56fe\u7247\u90fd\u662f\u7eb9\u4e1d\u4e0d\u52a8\u3002\u563f\uff0c\u6211\u4eec\u8fd9\u91cc\uff0c\u4e0a\u9762\u7684100*100\u7684\u6a21\u7cca\u5c42\u7684\u80cc\u666f\u56fe\u7247\u4e0d\u5c31\u662f\u5e0c\u671b\u79fb\u52a8\u7684\u65f6\u5019\uff0c\u8ddf\u4e0b\u9762\u56fe\u7247\u6b63\u597d\u5339\u5bf9\uff0c\u4e0d\u4f1a\u79fb\u52a8\u5417\uff0c\u5c5e\u6027\u649e\u5230\u67aa\u53e3\u4e0a\u4e86\u3002<\/p>\n<p>\u5176\u5b9e\uff0c<code>background-attachment:fixed<\/code>\u5f88\u6781\u5ba2\u7684\u5e94\u7528\u6211\u4ee5\u524d\u4e5f\u4ecb\u7ecd\u8fc7\uff0c\u8bf7\u770b\u4e0b\u9762\u8fd9\u4e2aIE7+\u517c\u5bb9<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=699\">\u7eafCSS\u5b9e\u73b0\u7684\u903c\u771f\u6613\u62c9\u7f503D\u6eda\u52a8\u6548\u679c<\/a>\uff08\u4e5f\u662f5\u5e74\u524d\uff0c\u62d6\u52a8\u6c34\u5e73\u6eda\u52a8\u6761\uff09\uff1a<br \/>\n<iframe loading=\"lazy\" width=\"550\" height=\"430\" frameborder=\"0\" src=\"http:\/\/www.zhangxinxu.com\/study\/201003\/css-coke-scroll-effect-simple.html\"><\/iframe><\/p>\n<p>\u56de\u5230\u8fd9\u91cc\uff0cHTML\u6211\u4eec\u8ddf\u4e0a\u9762\u4e00\u6837\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>&lt;div class=\"box\">\r\n    &lt;div id=\"drag\" class=\"drag\">&lt;\/div>\r\n&lt;\/div><\/pre>\n<\/div>\n<p>CSS\u53d8\u5316\u5f88\u7b80\u5355\uff0c<code>background<\/code>\u589e\u52a0\u4e00\u4e2a<code>fixed<\/code>:<\/p>\n<div class=\"zxx_code\">\n<pre>.box {  \r\n    background: url(mm1.jpg) no-repeat <span style=\"color:#cd0000;\">fixed<\/span>; \r\n}\r\n.drag { \r\n    background: inherit; \r\n}<\/pre>\n<\/div>\n<p>\u6ca1\u6709\u4efb\u4f55JS\u7684\u504f\u79fb\u8ba1\u7b97\uff0c\u4e8e\u662f\u6a21\u7cca\u6210\u5c31\u8fbe\u6210\uff01<\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a class=\"a_link\" target=\"_blank\" href=\"http:\/\/www.zhangxinxu.com\/study\/201502\/image-local-blur-by-background-attachment-fixed.html\" title=\"\u5c40\u90e8\u9ad8\u65af\u6a21\u7cca\u5b9e\u73b0-\u80cc\u666f\u56fe\u7247\u56fa\u5b9a\u5b9e\u73b0\">\u56fe\u7247\u5c40\u90e8\u6a21\u7cca-CSS background-attachment:fixed\u5b9e\u73b0<\/a><\/p>\n<p>\u4f46\u662f\uff0c\u8bf8\u4f4d\uff0c\u5207\u52ff\u6fc0\u52a8\uff0c\u5207\u52ff\u6b23\u559c\u3002<\/p>\n<p><code>background-attachment:fixed<\/code>\u662f\u76f8\u5bf9\u4e8e\u6574\u4e2a<code>window<\/code>\u89c6\u7a97\u56fa\u5b9a\u5b9a\u4f4d\u7684\uff0c\u6240\u4ee5\uff0c\u8981\u662f\u4f60\u7684\u9875\u9762\u6709\u5927\u6eda\u52a8\u6761\uff0c\u5475\u5475\u5475\uff0c\u80cc\u666f\u56fe\u7247\u5c31\u4f1a\u968f\u7740\u5185\u5bb9\u6eda\u6389\u800csay goodbye\u5566\uff01<\/p>\n<p>\u56e0\u6b64\uff0c\u8981\u60f3\u5b9e\u9645\u5e94\u7528\uff0c\u4e0b\u9762\u56db\u79cd\u8def\u6570\uff1a<\/p>\n<ol>\n<li>\u6ca1\u6709\u6eda\u52a8\u7684\u5355\u9875\u5e94\u7528\uff1b<\/li>\n<li>iframe\u5c0f\u5029(\u5d4c)\u4e00\u4e0b\uff1b<\/li>\n<li>\u5176\u4ed6CSS\u5b9a\u4f4d\u8def\u6570\uff08\u89c1\u6587\u672b\u538b\u8f74\u793a\u4f8b\uff09\uff1b<\/li>\n<li>JS\u8f85\u52a9\u4e0b\uff1b<\/li>\n<li>\u4f60\u60f3\u591a\u4e86\uff0c\u4e00\u822c\u6ca1\u6709\u52a8\u6001\u6a21\u7cca\u7684~<\/li>\n<\/ol>\n<p>\u6069\uff0c\u672c\u6587\u7ed3\u675f\uff0c\u8fd9\u4e0b\u53ef\u4ee5\u6253\u9053\u56de\u5e9c\u4e86\uff01<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/210.gif\" align=\"absmiddle\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201502\/buhoudao2.jpg\" width=\"261\" height=\"200\" alt=\"\u5c14\u5eb7\u53c8\u53d1\u98d9\u4e86\" class=\"alignnone\" \/><\/p>\n<p>\u770b\u5230\u5c14\u5eb7\u8fd9\u5f20\u626d\u66f2\u5982\u7ae0\u9c7c\u7684\u8138\uff0c\u6211\u89c9\u5f97\u6211\u5e94\u8be5\u518d\u8bb2\u70b9\u4e1c\u897f\uff0c\u4f19\u8ba1\u4eec\uff0c\u4e1c\u897f\u653e\u4e0b\uff0c\u518d\u52a0\u4f1a\u513f\u73ed~<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/29.gif\" align=\"absmiddle\"><\/p>\n<h3>\u516d\u3001\u6587\u5b57\u4e0e\u52a8\u6001\u6a21\u7cca<\/h3>\n<p>\u77e5\u9053\uff0cwebkit\u6d4f\u89c8\u5668\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u6587\u5b57\u906e\u7f69\u80cc\u666f\u56fe\u7247\u6548\u679c\u3002\u4e8e\u662f\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u6587\u5b57\u7684\u52a8\u6001\u6a21\u7cca\u6548\u679c\uff1a<\/p>\n<p>\u5982\u4e0b\uff0c\u82e5\u662fChrome\u7b49\u6d4f\u89c8\u5668\uff0c\u6eda\u52a8\u6eda\u52a8\u6761\uff1a<br \/>\n<iframe loading=\"lazy\" src=\"\/\/www.zhangxinxu.com\/study\/201502\/text-blur.html\" frameborder=\"0\" width=\"256\" height=\"191\" class=\"mt10\"><\/iframe><\/p>\n<p>\u56e0\u4e3a\u6587\u5b57\u672c\u8eab\u6bd4\u8f83\u7ea4\u5f31\uff0c\u6240\u4ee5\u6a21\u7cca\u540e\uff0c\u6eda\u52a8\u6eda\u52a8\u6761\u7684\u65f6\u5019\uff0c\u53ea\u80fd\u770b\u5230\u4e00\u56e2\u96fe\u6c14\u4ece\u59b9\u5b50\u524d\u9762\u98d8\u8fc7\u3002\u8bd5\u60f3\u4e0b\uff0c\u5982\u679c\u56fe\u7247\u4e0a\u5bc6\u5bc6\u9ebb\u9ebb\u7684\u6587\u5b57\uff0c\u5c82\u4e0d\u662f\u4e00\u4e2a\u5f88\u8d5e\u7684\u6a21\u7cca\u6548\u679c\uff01<\/p>\n<h3>\u4e03\u3001\u9875\u9762\u5143\u7d20\u4e0e\u52a8\u6001\u6a21\u7cca<\/h3>\n<p>\u5982\u4f55\u5b9e\u73b0\u7c7b\u4f3ciOS\u90a3\u6837\u7684\u6bdb\u73bb\u7483\u6548\u679c\uff1f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201502\/mapbili.jpg\" width=\"206\" height=\"375\" alt=\"\u6bdb\u73bb\u7483\u6548\u679c\" class=\"alignnone\" \/><\/p>\n<p>\u5927\u5bb6\u53ef\u4ee5\u8111\u8865\u4e0b\u8fd9\u79cd\u6548\u679c\u7684\u7279\u70b9\u3002\u6bd4\u65b9\u8bf4\u51fa\u73b0\u4e00\u4e2a\u4e0b\u62c9\uff0c\u4e0b\u62c9\u6846\u6240\u8986\u76d6\u7684\u9875\u9762\u533a\u57df\uff0c\u65e0\u8bba\u6587\u5b57\u6216\u56fe\u6807\u56fe\u5f62\u90fd\u6a21\u7cca\u3002\u6211\u9760\uff01\u4e0b\u62c9\u6846\u8986\u76d6\u5730\u65b9\u624d\u6a21\u7cca\uff0c\u6bd4\u65b9\u8bf4\uff0c\u6211\u4e0b\u62c9\u6846\u8fb9\u89d2\u6b63\u597d\u8986\u76d6\u4e86\u4e00\u534a\u7684\u6587\u5b57\uff0c\u4f60\u53eb\u6211\u5982\u4f55\u53ea\u6a21\u7cca\u4e00\u534a\u7684\u6587\u5b57\uff1f\uff01<\/p>\n<p>\u6240\u4ee5\uff0c\u5728web\u9875\u9762\u4e0a\u5b9e\u73b0\u52a8\u6001\u6a21\u7cca\uff0c\u4f3c\u4e4e\u9065\u4e0d\u53ef\u53ca\u3002<\/p>\n<p>\u4f46\uff0c\u6211\u8981\u8f6c\u6298\u4e0b\uff0c\u8bf4\u4e0d\u5b9a\u53ef\u4ee5\u5b9e\u73b0\u3002<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u5229\u7528SVG\u7684foreignObject\uff0c\u5c06\u6574\u4e2a\u9875\u9762\u8f6c\u6362\u6210\u56fe\u7247\uff0c\u4e8e\u662f\uff0c\u4e0b\u62c9\u6846\u51fa\u73b0\u65f6\u5019\uff0c\u6211\u4eec\u6240\u8981\u505a\u7684\u5c31\u662f\u4e0a\u9762\u5c55\u793a\u7684\u8986\u76d6\u6a21\u7cca\u3002<\/p>\n<p>So, \u5927\u5bb6\u610f\u8bc6\u5230\u6728\u6709\uff0c\u4e0a\u9762\u770b\u4e0a\u53bb\u6ca1\u4ec0\u4e48\u4ef7\u503c\u7684\u6548\u679c\u5b9e\u9645\u4e0a\u8ba9\u4f60\u7ec3\u57fa\u672c\u529f\u5462\uff01<\/p>\n<p>\u65f6\u95f4\u539f\u56e0\uff0c\u6211\u8fd8\u6ca1\u8bd5\u9a8c\uff0c\u4f30\u8ba1\u6625\u8282\u4e4b\u540e\u89c1\u5206\u6653\u3002<\/p>\n<h3>\u516b\u3001\u52a8\u6001\u6a21\u7cca\u5b9e\u6218\u2014\u2014\u66f4\u9ad8\u5927\u4e0a\u7684\u767e\u5ea6\u56fe\u7247\u9996\u9875<\/h3>\n<p>\u6211\u4eec\u5148\u770b\u4e0b\u65b0\u7248\u7684\u767e\u5ea6\u56fe\u7247\u9996\u9875\uff0c\u793a\u4f8b\u7f29\u7565\u56fe\u4e0b\u9762\u7684\u7c7b\u522b\u6587\u5b57\u662f\u767d\u8272\u7684\uff0c\u4e3a\u4e86\u4e0d\u81f3\u4e8e\u8ddf\u6d45\u8272\u56fe\u7247\u6df7\u6742\u5728\u4e00\u8d77\uff0c\u4e8e\u662f\uff0c\u4f7f\u7528\u4e86\u6e10\u53d8\u7b56\u7565\uff1a<\/p>\n<p>\u73b0\u4ee3\u6d4f\u89c8\u5668\u4e0b\uff0c\u4f7f\u7528\u7684\u662fCSS3\u6e10\u53d8\uff0c\u6bcf\u4e2a\u6e10\u53d8\u989c\u8272\u90fd\u662f\u8bbe\u8ba1\u5e08\uff08\u4e5f\u6709\u53ef\u80fd\u662f\u811a\u672c\u5224\u65ad\uff09\u6839\u636e\u5f53\u524d\u56fe\u7247\u8272\u8c03\u9009\u53d6\u7684\uff0c\u56e0\u6b64\uff0c\u6bcf\u4e2a\u6e10\u53d8\u989c\u8272\u90fd\u4e0d\u4e00\u6837\uff0c\u52a0\u4e0a\u8fc7\u4e8e\u5bc6\u96c6\u7684\u79c1\u6709\u5c5e\u6027\u5904\u7406\uff0c\u4ee3\u7801\u91cf\u8fd8\u662f\u6bd4\u8f83\u591a\u7684\uff1a<br \/>\n<img decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201904\/bai-blur.jpg\" width=\"571\" alt=\"\u73b0\u4ee3\u6d4f\u89c8\u5668\u4e0b\u6e10\u53d8\" class=\"alignnone\" \/><\/p>\n<p>\u5bf9\u4e8eIE7\u7b49\u4e0d\u652f\u6301\u6e10\u53d8\u7684\u6d4f\u89c8\u5668\uff0c\u91c7\u7528\u7684\u662f\u9ed1\u8272\u56fe\u7247\uff08\u975e<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=743\">\u7ebf\u6027\u6e10\u53d8\u6ee4\u955c<\/a>\uff09\uff0c\u6548\u679c\u561b\uff0c\u8fd8\u662f\u6bd4\u8f83\u914d\u5f97\u4e0a\u4f7f\u7528IE7\u7528\u6237\u7684\u8eab\u4efd\u7684\u3002<br \/>\n<img decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201904\/ie7-blur-black.jpg\" width=\"571\" alt=\"IE7\u9ed1\u8272\u6e10\u53d8\u80cc\u666f\u56fe\u7247\" class=\"alignnone\" \/><\/p>\n<p><strong>\u66f4\u9ad8\u5927\u4e0a\u7684\u52a8\u6001\u6bdb\u73bb\u7483\u6548\u679c<\/strong><br \/>\n\u50cf\u8fd9\u79cd\u8bb2\u7a76\u89c6\u89c9\u54c1\u8d28\u7684\u9875\u9762\uff0c\u7c7biOS\u7684\u6bdb\u73bb\u7483\u6548\u679c\u81ea\u7136\u4f1a\u63d0\u5347\u903c\u683c\uff01\u770b\u770b\u6211\u662f\u5982\u4f55\u5b9e\u73b0\u7684~~<\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201502\/image-baidu-homepage-local-blur.html\" target=\"_blank\">\u5168\u517c\u5bb9\u5c40\u90e8\u52a8\u6001\u6a21\u7cca\u767e\u5ea6\u56fe\u7247\u9996\u9875demo<\/a><\/p>\n<p><strong>1. \u517c\u5bb9\u6027<\/strong><br \/>\n<strong>\u5168\u517c\u5bb9<\/strong>\u3002\u517c\u5bb9IE7-IE8(IE6\u672a\u6d4b\uff0c\u7406\u8bba\u4e0a\u4e5f\u517c\u5bb9)\uff0c\u517c\u5bb9\u9ad8\u4e0d\u6210\u4f4e\u4e0d\u5c31\u7684IE9\uff0c\u517c\u5bb9IE10+\uff0c \u517c\u5bb9Chrome\u4ee5\u53caFireFox\u7b49\u73b0\u4ee3\u6d4f\u89c8\u5668\u3002\u7ed9\u5927\u5bb6\u622a\u51e0\u5f20\u56fe\u7785\u7785\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201904\/chrome-blur.jpg\" width=\"588\" height=\"366\" alt=\"Chrome\u6d4f\u89c8\u5668\u4e0b\u622a\u56fe\" class=\"alignnone\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201904\/firefox-blur.jpg\" width=\"571\" height=\"367\" alt=\"FireFox 35\u4e0b\u622a\u56fe\" class=\"alignnone\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201904\/ie8-blur.jpg\" width=\"571\" height=\"349\" alt=\"IE8\u6d4f\u89c8\u5668\u4e0b\u622a\u56fe\" class=\"alignnone\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201904\/ie9-blur.jpg\" width=\"571\" height=\"353\" alt=\"IE9\u6d4f\u89c8\u5668\u4e0b\u622a\u56fe\" class=\"alignnone\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201904\/ie10-blur.jpg\" width=\"571\" height=\"348\" alt=\"IE10\u6d4f\u89c8\u5668\u4e0b\u622a\u56fe\" class=\"alignnone\" \/><\/p>\n<p>\u4e14\u6a21\u7cca\u6548\u679c\u662f\u52a8\u6001\u7684\uff0c\u4e5f\u5c31\u662f\u4f60\u56fe\u7247\u6bd4\u4f8b\u53d8\u5316\uff0c\u6216\u8005\u4e0b\u9762\u7684\u6a21\u7cca\u533a\u57df\u9ad8\u5ea6\u53d8\u9ad8\uff0c\u6bdb\u73bb\u7483\u6548\u679c\u662f\u52a8\u6001\u8ddf\u968f\u7684\u3002<\/p>\n<p><strong>2. \u57fa\u672c\u539f\u7406<\/strong><br \/>\n\u9996\u5148\uff0c\u5c31\u662f\u4ece\u4e00\u5f00\u59cb\u5c31\u5410\u69fd\u7684\u4e24\u5c42\u8986\u76d6\u3002\u6700\u540e\uff0c\u6a21\u7cca\u6548\u679c\u5c31\u662f\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=3804\">\u4f7f\u7528CSS\u5c06\u56fe\u7247\u8f6c\u6362\u6210\u6a21\u7cca(\u6bdb\u73bb\u7483)\u6548\u679c<\/a>\u201d\u4e00\u6587\u4e2d\u7684\u65b9\u6cd5\u3002<\/p>\n<p>IE6~IE9\u4f7f\u7528\u7684\u662fIE\u79c1\u6709\u6a21\u7cca\u6ee4\u955c\uff0cChrome\u548cFireFox 35+\u4f7f\u7528\u7684\u662fCSS3 <code>filter<\/code>\u6ee4\u955c\uff0cFireFox 35-\u4f7f\u7528\u5916\u94feSVG\u6ee4\u955c\uff0cIE10+\u4f7f\u7528\u7684\u662f\u5185\u8054SVG\u7684\u6a21\u7cca\u6ee4\u955c\u5b9e\u73b0\uff08\u6709\u4e00\u70b9\u811a\u672c\u8f85\u52a9\uff09\u3002<\/p>\n<p>\u5b8c\u6574CSS\u4ee3\u7801\u5927\u5bb6\u53ef\u4ee5\u76f4\u63a5\u3010\u53f3\u952e\u9875\u9762\u2192\u67e5\u770b\u6e90\u4ee3\u7801\u3011\u56f4\u89c2\uff0c\u6b22\u8fce\u6307\u51fa\u4e0d\u8db3\uff0c\u6b22\u8fce\u63d0\u51fa\u66f4\u597d\u65b9\u6cd5\u3002<\/p>\n<p><strong>3. \u4e00\u4e9b\u5c0f\u95ee\u9898<\/strong><br \/>\n\u9ad8\u65af\u6a21\u7cca\u5929\u751f\u6709\u4e2a\u4e0d\u8db3\uff0c\u5c31\u662f\u8fb9\u7f18\u7684\u6a21\u7cca\u6548\u679c\u4f1a\u6bd4\u8f83\u5f31\uff0c\u56e0\u6b64\uff0c\u4f1a\u6709\u8fb9\u7f18\u9542\u7a7a\u7684\u611f\u89c9\u3002\u82e5\u8981\u89c4\u907f\u6b64\u95ee\u9898\uff0c\u6a21\u7cca\u7684\u56fe\u7247\u9ed8\u8ba4\u4e0d\u662f100%\u5bbd\u5ea6\uff0c\u800c\u662f(\u4f8b\u5982)105%\u5927\u5c0f\uff0c\u6ea2\u51fa\u5bb9\u5668\u4e00\u70b9\u70b9\uff0c\u8fd9\u6837\uff0c\u8fb9\u7f18\u6a21\u7cca\u6548\u679c\u4e5f\u4f1a\u5f3a\u70c8\u4e86\u3002<\/p>\n<h3>\u4e5d\u3001\u672c\u6587\u7ed3\u675f\uff0c\u6253\u9053\u56de\u5e9c<\/h3>\n<p>demo\u9875\u9762\u76f4\u63a5\u4f7f\u7528\u767e\u5ea6\u539f\u59cbURL\u5730\u5740\uff0c\u8981\u662f\u54ea\u5929\u5730\u5740\u6302\u4e86\uff0c\u591a\u8c22\u8bf8\u4f4d\u5e2e\u5fd9\u6307\u51fa\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u5f88\u591a\u4eba\u4e0d\u559c\u6b22\u6211\u5570\u55e6\uff0c\u5c31\u4e0d\u8bf4\u4ec0\u4e48\u4e86\u3002<\/p>\n<p>\u672c\u6587\u7ed3\u675f\uff0c\u6253\u9053\u56de\u5e9c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201502\/erkang-wait.jpg\" width=\"200\" height=\"231\" alt=\"\u5c14\u5eb7\u7b49\u4e00\u4e0b\" class=\"alignnone\" \/><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u4f1a\u7ecf\u5e38\u66f4\u65b0\u77e5\u8bc6\u70b9\u4ee5\u53ca\u4fee\u6b63\u4e00\u4e9b\u9519\u8bef\uff0c\u56e0\u6b64\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u539f\u51fa\u5904\uff0c\u65b9\u4fbf\u6eaf\u6e90\uff0c\u907f\u514d\u9648\u65e7\u9519\u8bef\u77e5\u8bc6\u7684\u8bef\u5bfc\uff0c\u540c\u65f6\u6709\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=4571\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=4571<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u5185\u5bb9\u5982\u9898\uff0c\u56fe\u7247\u52a8\u6001\u5c40\u90e8\u6bdb\u73bb\u7483\u6a21\u7cca\u6548\u679c\u7684\u5b9e\u73b0\uff0c\u6709\u56fe\u6709\u6587\u6709\u7801\u6709\u5b9e\u6218\uff0c\u66f4\u6709\u5c14\u5eb7\u4eb2\u4e34\u52a9\u9635\uff0c\u5e0c\u671b\u672c\u6587\u7684\u5185\u5bb9\u80fd\u591f\u5bf9\u60a8\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,895],"tags":[976,977,361,642,290,885,975,206,104,886],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/4571"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=4571"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/4571\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=4571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=4571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=4571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}