{"id":2187,"date":"2024-11-10T15:57:58","date_gmt":"2024-11-10T07:57:58","guid":{"rendered":"https:\/\/fwq.ai\/blog\/2187\/"},"modified":"2024-11-10T15:57:58","modified_gmt":"2024-11-10T07:57:58","slug":"%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8-css-%e8%bf%87%e6%bb%a4%e5%99%a8%e5%92%8c%e5%b5%8c%e5%a5%97%e5%85%83%e7%b4%a0%e5%ae%9e%e7%8e%b0%e5%9b%be%e4%b8%ad%e9%bb%91%e8%89%b2%e4%b8%8d%e8%a7%84%e5%88%99","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/2187\/","title":{"rendered":"\u5982\u4f55\u5229\u7528 CSS \u8fc7\u6ee4\u5668\u548c\u5d4c\u5957\u5143\u7d20\u5b9e\u73b0\u56fe\u4e2d\u9ed1\u8272\u4e0d\u89c4\u5219\u5757\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173068381860110.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5229\u7528 CSS \u8fc7\u6ee4\u5668\u548c\u5d4c\u5957\u5143\u7d20\u5b9e\u73b0\u56fe\u4e2d\u9ed1\u8272\u4e0d\u89c4\u5219\u5757\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5229\u7528 CSS \u8fc7\u6ee4\u5668\u548c\u5d4c\u5957\u5143\u7d20\u5b9e\u73b0\u56fe\u4e2d\u9ed1\u8272\u4e0d\u89c4\u5219\u5757\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4e0d\u89c4\u5219\u5757\uff1a\u5de7\u7528\u201c\u8fc7\u6ee4\u5668\u201d\u548c\u201c\u5d4c\u5957\u201d<\/strong><\/p>\n<p>\u9488\u5bf9\u60f3\u8981\u5b9e\u73b0\u56fe\u4e2d\u9ed1\u8272\u4e0d\u89c4\u5219\u5757\u7684\u9700\u6c42\uff0c\u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u5982\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<p><strong>\u7b2c\u4e00\u6b65\uff1a\u4f7f\u7528\u6ee4\u955c\u6280\u5de7<\/strong><\/p>\n<p>\u901a\u8fc7\u6ee4\u955c\uff0c\u6211\u4eec\u53ef\u4ee5\u6dfb\u52a0\u900f\u660e\u5ea6\u548c\u6a21\u7cca\u6548\u679c\uff0c\u8ba9\u5143\u7d20\u5448\u73b0\u51fa\u4e0d\u89c4\u5219\u7684\u89c6\u89c9\u6548\u679c\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u7b2c\u4e8c\u6b65\uff1a\u4f7f\u7528\u5d4c\u5957\u5143\u7d20<\/strong><\/p>\n<p>\u4e3a\u4e86\u6539\u53d8\u4e0d\u89c4\u5219\u5757\u7684\u989c\u8272\u548c\u6a21\u7cca\u7a0b\u5ea6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5d4c\u5957\u5143\u7d20\u7684\u65b9\u5f0f\u3002\u5728\u7236\u5143\u7d20\u4e2d\u8bbe\u5b9a\u989c\u8272\u548c\u6a21\u7cca\u5ea6\uff0c\u7136\u540e\u5728\u5b50\u5143\u7d20\u4e2d\u6539\u53d8\u8fd9\u4e9b\u5c5e\u6027\u3002<\/p>\n<p><strong>\u4ee3\u7801\u6f14\u793a<\/strong><\/p>\n<p>\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0\u56fe\u4e2d\u7684\u6548\u679c\uff1a<\/p>\n<pre>&lt;div class=\"parent\"&gt;\n  &lt;div class=\"child-1\"&gt;&lt;\/div&gt;\n  &lt;div class=\"child-2\"&gt;&lt;\/div&gt;\n&lt;\/div&gt;\n\n.parent {\n  width: 500px;\n  height: 500px;\n  filter: blur(5px) opacity(0.5);\n}\n\n.child-1 {\n  width: 200px;\n  height: 200px;\n  background-color: #000;\n  filter: blur(0px) opacity(1);\n}\n\n.child-2 {\n  width: 100px;\n  height: 100px;\n  background-color: #fff;\n  filter: blur(0px) opacity(0.5);\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5229\u7528 CSS \u8fc7\u6ee4\u5668\u548c\u5d4c\u5957\u5143\u7d20\u5b9e\u73b0\u56fe\u4e2d\u9ed1\u8272\u4e0d\u89c4\u5219\u5757\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u89c4\u5219\u5757\uff1a\u5de7\u7528\u201c\u8fc7\u6ee4\u5668\u201d\u548c\u201c\u5d4c\u5957\u201d \u9488\u5bf9\u60f3\u8981\u5b9e\u73b0\u56fe\u4e2d\u9ed1\u8272\u4e0d\u89c4\u5219\u5757\u7684\u9700\u6c42\uff0c\u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u5982\u4e0b\u65b9\u6cd5\uff1a \u7b2c\u4e00\u6b65\uff1a\u4f7f\u7528\u6ee4\u955c\u6280\u5de7 \u901a\u8fc7\u6ee4\u955c\uff0c\u6211\u4eec\u53ef\u4ee5\u6dfb\u52a0\u900f\u660e\u5ea6\u548c\u6a21\u7cca\u6548\u679c\uff0c\u8ba9\u5143\u7d20\u5448\u73b0\u51fa\u4e0d\u89c4\u5219\u7684\u89c6\u89c9\u6548\u679c\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u7b2c\u4e8c\u6b65\uff1a\u4f7f\u7528\u5d4c\u5957\u5143\u7d20 \u4e3a\u4e86\u6539\u53d8\u4e0d\u89c4\u5219\u5757\u7684\u989c\u8272\u548c\u6a21\u7cca\u7a0b\u5ea6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5d4c\u5957\u5143\u7d20\u7684\u65b9\u5f0f\u3002\u5728\u7236\u5143\u7d20\u4e2d\u8bbe\u5b9a\u989c\u8272\u548c\u6a21\u7cca\u5ea6\uff0c\u7136\u540e\u5728\u5b50\u5143\u7d20\u4e2d\u6539\u53d8\u8fd9\u4e9b\u5c5e\u6027\u3002 \u4ee3\u7801\u6f14\u793a \u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5b9e\u73b0\u56fe\u4e2d\u7684\u6548\u679c\uff1a &lt;div class=&#8221;parent&#8221;&gt; &lt;div class=&#8221;child-1&#8243;&gt;&lt;\/div&gt; &lt;div class=&#8221;child-2&#8243;&gt;&lt;\/div&gt; &lt;\/div&gt; .parent { width: 500px; height: 500px; filter: blur(5px) opacity(0.5); } .child-1 { width: 200px; height: 200px; background-color: #000; filter: blur(0px) opacity(1); } .child-2 { width: 100px; height: 100px; background-color: #fff; filter: blur(0px) opacity(0.5); } \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5229\u7528 CSS \u8fc7\u6ee4\u5668\u548c\u5d4c\u5957\u5143\u7d20\u5b9e\u73b0\u56fe\u4e2d\u9ed1\u8272\u4e0d\u89c4\u5219\u5757\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2187","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=2187"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/2187\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=2187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=2187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=2187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}