{"id":28055,"date":"2024-11-24T10:18:25","date_gmt":"2024-11-24T02:18:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/28055\/"},"modified":"2024-11-24T10:18:25","modified_gmt":"2024-11-24T02:18:25","slug":"%e5%a6%82%e4%bd%95%e7%94%a8-css-%e5%b7%a7%e5%a6%99%e7%bb%98%e5%88%b6%e5%9c%86%e7%8e%af%e5%b9%b6%e5%88%87%e9%99%a4%e7%89%b9%e5%ae%9a%e8%a7%92%e5%ba%a6%e7%bc%ba%e5%8f%a3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/28055\/","title":{"rendered":"\u5982\u4f55\u7528 CSS \u5de7\u5999\u7ed8\u5236\u5706\u73af\u5e76\u5207\u9664\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173138672251712.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7528 CSS \u5de7\u5999\u7ed8\u5236\u5706\u73af\u5e76\u5207\u9664\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u7528 CSS \u5de7\u5999\u7ed8\u5236\u5706\u73af\u5e76\u5207\u9664\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong> \u5de7\u5999\u7ed8\u5236\u5706\u73af\uff0c\u8f7b\u677e\u5207\u51fa\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3<\/strong><\/p>\n<p>\u5728 css \u6837\u5f0f\u8868\u4e2d\uff0c\u60f3\u8981\u7ed8\u5236\u4e00\u4e2a\u5706\u73af\u5e76\u5207\u9664\u4e00\u90e8\u5206\uff0c\u53ef\u4e0d\u662f\u4ef6\u5bb9\u6613\u7684\u4e8b\uff0c\u5c24\u5176\u662f\u5f53\u6240\u5207\u89d2\u5ea6\u4e0d\u4e00\u5b9a\u662f 90 \u5ea6\uff0c\u6216\u8005\u7f3a\u53e3\u4e5f\u9700\u8981\u900f\u660e\u65f6\u3002<\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u9700\u8981\u4f7f\u7528 css \u4e2d\u7684\u5de7\u5999\u6280\u5de7\u3002<\/p>\n<p><strong>\u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528\u5c42\u53e0\u548c\u65cb\u8f6c<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u5f53\u6240\u5207\u89d2\u5ea6\u5c0f\u4e8e 90 \u5ea6\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5c42\u53e0\u548c\u65cb\u8f6c\u6765\u5b9e\u73b0\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u521b\u5efa\u4e24\u5c42\u5706\u73af\uff0c\u65cb\u8f6c\u4e0d\u540c\u89d2\u5ea6\u3002<\/li>\n<li>\u8bbe\u7f6e\u5176\u4e2d\u4e00\u5c42\u5706\u73af\u7684\u8fb9\u6846\u989c\u8272\u4e3a\u900f\u660e\u3002<\/li>\n<li>\u901a\u8fc7\u8c03\u6574\u65cb\u8f6c\u89d2\u5ea6\uff0c\u63a7\u5236\u7f3a\u53e3\u7684\u5927\u5c0f\u548c\u4f4d\u7f6e\u3002<\/li>\n<\/ol>\n<p><strong>\u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528 conic-gradient \u548c radial-gradient<\/strong><\/p>\n<p>\u4e00\u4e2a\u66f4\u4e3a\u590d\u6742\u4f46\u66f4\u7075\u6d3b\u7684\u65b9\u6cd5\uff0c\u662f\u4f7f\u7528 conic-gradient \u548c radial-gradient\u3002<\/p>\n<ol>\n<li>\u4f7f\u7528 conic-gradient \u521b\u5efa\u5706\u73af\u3002<\/li>\n<li>\u4f7f\u7528 radial-gradient \u521b\u5efa\u4e00\u4e2a\u906e\u7f69\uff0c\u8986\u76d6\u4f4f\u5207\u9664\u7684\u90e8\u5206\uff0c\u4f7f\u5176\u900f\u660e\u3002<\/li>\n<li>\u5c06\u906e\u7f69\u5e94\u7528\u4e8e\u5706\u73af\uff0c\u8fbe\u5230\u906e\u76d6\u6548\u679c\u3002<\/li>\n<\/ol>\n<p><strong>\u4ee3\u7801\u793a\u4f8b<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528conic-gradient \u548c radial-gradient\u5b9e\u73b0\u5706\u73af\u5207\u9664\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3\u7684\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<pre>background: conic-gradient(\n    #fff 0deg 180deg,\n    transparent 180deg 360deg\n) mask radial-gradient(\n    rgba(255, 255, 255, 1) 0%,\n    transparent 50%,\n    transparent 100%\n);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u901a\u8fc7\u8c03\u6574 conic-gradient \u7684\u89d2\u5ea6\u8303\u56f4\u548c radial-gradient \u7684\u534a\u5f84\uff0c\u53ef\u4ee5\u63a7\u5236\u7f3a\u53e3\u7684\u5927\u5c0f\u548c\u4f4d\u7f6e\u3002<\/p>\n<p><strong>\u7ed3\u8bed<\/strong><\/p>\n<p>\u867d\u7136\u5728 css \u4e2d\u7ed8\u5236\u5706\u73af\u5e76\u5207\u9664\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3\u9700\u8981\u4e00\u4e9b\u6280\u5de7\uff0c\u4f46\u901a\u8fc7\u5de7\u5999\u7684\u7ec4\u5408\u4e0d\u540c\u5c5e\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9e\u73b0\u4ee4\u4eba\u5370\u8c61\u6df1\u523b\u7684\u6548\u679c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528 CSS \u5de7\u5999\u7ed8\u5236\u5706\u73af\u5e76\u5207\u9664\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3\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>\u5de7\u5999\u7ed8\u5236\u5706\u73af\uff0c\u8f7b\u677e\u5207\u51fa\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3 \u5728 css \u6837\u5f0f\u8868\u4e2d\uff0c\u60f3\u8981\u7ed8\u5236\u4e00\u4e2a\u5706\u73af\u5e76\u5207\u9664\u4e00\u90e8\u5206\uff0c\u53ef\u4e0d\u662f\u4ef6\u5bb9\u6613\u7684\u4e8b\uff0c\u5c24\u5176\u662f\u5f53\u6240\u5207\u89d2\u5ea6\u4e0d\u4e00\u5b9a\u662f 90 \u5ea6\uff0c\u6216\u8005\u7f3a\u53e3\u4e5f\u9700\u8981\u900f\u660e\u65f6\u3002 \u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u9700\u8981\u4f7f\u7528 css \u4e2d\u7684\u5de7\u5999\u6280\u5de7\u3002 \u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528\u5c42\u53e0\u548c\u65cb\u8f6c \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5f53\u6240\u5207\u89d2\u5ea6\u5c0f\u4e8e 90 \u5ea6\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5c42\u53e0\u548c\u65cb\u8f6c\u6765\u5b9e\u73b0\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a \u521b\u5efa\u4e24\u5c42\u5706\u73af\uff0c\u65cb\u8f6c\u4e0d\u540c\u89d2\u5ea6\u3002 \u8bbe\u7f6e\u5176\u4e2d\u4e00\u5c42\u5706\u73af\u7684\u8fb9\u6846\u989c\u8272\u4e3a\u900f\u660e\u3002 \u901a\u8fc7\u8c03\u6574\u65cb\u8f6c\u89d2\u5ea6\uff0c\u63a7\u5236\u7f3a\u53e3\u7684\u5927\u5c0f\u548c\u4f4d\u7f6e\u3002 \u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528 conic-gradient \u548c radial-gradient \u4e00\u4e2a\u66f4\u4e3a\u590d\u6742\u4f46\u66f4\u7075\u6d3b\u7684\u65b9\u6cd5\uff0c\u662f\u4f7f\u7528 conic-gradient \u548c radial-gradient\u3002 \u4f7f\u7528 conic-gradient \u521b\u5efa\u5706\u73af\u3002 \u4f7f\u7528 radial-gradient \u521b\u5efa\u4e00\u4e2a\u906e\u7f69\uff0c\u8986\u76d6\u4f4f\u5207\u9664\u7684\u90e8\u5206\uff0c\u4f7f\u5176\u900f\u660e\u3002 \u5c06\u906e\u7f69\u5e94\u7528\u4e8e\u5706\u73af\uff0c\u8fbe\u5230\u906e\u76d6\u6548\u679c\u3002 \u4ee3\u7801\u793a\u4f8b \u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528conic-gradient \u548c radial-gradient\u5b9e\u73b0\u5706\u73af\u5207\u9664\u7279\u5b9a\u89d2\u5ea6\u7f3a\u53e3\u7684\u4ee3\u7801\u793a\u4f8b\uff1a background: conic-gradient( #fff 0deg 180deg, transparent 180deg 360deg ) mask radial-gradient( rgba(255, 255, 255, 1) 0%, transparent 50%, transparent [&hellip;]<\/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-28055","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28055","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=28055"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28055\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=28055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=28055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=28055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}