{"id":27796,"date":"2024-11-24T17:43:54","date_gmt":"2024-11-24T09:43:54","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27796\/"},"modified":"2024-11-24T17:43:54","modified_gmt":"2024-11-24T09:43:54","slug":"svg-%e8%83%bd%e5%ae%9e%e7%8e%b0%e7%9c%9f%e6%ad%a3%e7%9a%84%e7%8e%af%e5%bd%a2%e6%b8%90%e5%8f%98%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27796\/","title":{"rendered":"SVG \u80fd\u5b9e\u73b0\u771f\u6b63\u7684\u73af\u5f62\u6e10\u53d8\u5417\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173131705229111.jpg\" class=\"aligncenter\" title=\"SVG \u80fd\u5b9e\u73b0\u771f\u6b63\u7684\u73af\u5f62\u6e10\u53d8\u5417\uff1f\u63d2\u56fe\" alt=\"SVG \u80fd\u5b9e\u73b0\u771f\u6b63\u7684\u73af\u5f62\u6e10\u53d8\u5417\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>svg\u80fd\u5426\u5b9e\u73b0\u771f\u6b63\u7684\u73af\u5f62\u6e10\u53d8\uff1f<\/strong><\/p>\n<p>\u4f7f\u7528svg\u5b9e\u73b0\u7684\u73af\u5f62\u8fdb\u5ea6\u6761\u901a\u5e38\u65e0\u6cd5\u5b9e\u73b0\u5b8c\u5168\u7684\u73af\u5f62\u6e10\u53d8\uff0c\u672c\u8d28\u4e0a\u8fd8\u662f\u6c34\u5e73\u6e10\u53d8\u3002\u5f53\u73af\u5f62\u5ea6\u6570\u8d85\u8fc7250\u5ea6\u65f6\uff0c\u5c06\u4f1a\u4f53\u73b0\u51fa\u6c34\u5e73\u6e10\u53d8\u3002<\/p>\n<p>\u5173\u952e\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<pre>&lt;defs&gt;\n  &lt;linearGradient id=\"grad1\"&gt;\n    &lt;stop offset=\"0%\" stop-color=\"#29D65A\"&gt;&lt;\/stop&gt;\n    &lt;stop offset=\"100%\" stop-color=\"#b3eac3\"&gt;&lt;\/stop&gt;\n  &lt;\/linearGradient&gt;\n&lt;\/defs&gt;\n&lt;path d=\"M 50 50 m 45 0 a 45 45 0 1 1 -0.08879722072777696 -2.825573378819097\" fill=\"none\" stroke=\"url(#grad1)\" stroke-width=\"5\" stroke-linecap=\"round\"&gt;&lt;\/path&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u901a\u8fc7svg\u5b9e\u73b0\u73af\u5f62\u6e10\u53d8\uff1f<\/strong><\/p>\n<p>\u76ee\u524dsvg\u4ec5\u652f\u6301\u7ebf\u6027\u6e10\u53d8\u548c\u5f84\u5411\u6e10\u53d8\u3002\u65e0\u6cd5\u5b9e\u73b0\u4e0e\u4e2dconic-gradient\u4e00\u6837\u7684\u73af\u5f62\u6e10\u53d8\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528clippath\u548cforeignobject\u914d\u5408css\u5b9e\u73b0\u73af\u5f62\u6e10\u53d8\uff0c\u5177\u4f53\u65b9\u6cd5\u53ef\u4ee5\u53c2\u8003\uff1a<\/p>\n<p>my struggle to use and animate a conic gradient in svg<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fSVG \u80fd\u5b9e\u73b0\u771f\u6b63\u7684\u73af\u5f62\u6e10\u53d8\u5417\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>svg\u80fd\u5426\u5b9e\u73b0\u771f\u6b63\u7684\u73af\u5f62\u6e10\u53d8\uff1f \u4f7f\u7528svg\u5b9e\u73b0\u7684\u73af\u5f62\u8fdb\u5ea6\u6761\u901a\u5e38\u65e0\u6cd5\u5b9e\u73b0\u5b8c\u5168\u7684\u73af\u5f62\u6e10\u53d8\uff0c\u672c\u8d28\u4e0a\u8fd8\u662f\u6c34\u5e73\u6e10\u53d8\u3002\u5f53\u73af\u5f62\u5ea6\u6570\u8d85\u8fc7250\u5ea6\u65f6\uff0c\u5c06\u4f1a\u4f53\u73b0\u51fa\u6c34\u5e73\u6e10\u53d8\u3002 \u5173\u952e\u4ee3\u7801\u793a\u4f8b\uff1a &lt;defs&gt; &lt;linearGradient id=&#8221;grad1&#8243;&gt; &lt;stop offset=&#8221;0%&#8221; stop-color=&#8221;#29D65A&#8221;&gt;&lt;\/stop&gt; &lt;stop offset=&#8221;100%&#8221; stop-color=&#8221;#b3eac3&#8243;&gt;&lt;\/stop&gt; &lt;\/linearGradient&gt; &lt;\/defs&gt; &lt;path d=&#8221;M 50 50 m 45 0 a 45 45 0 1 1 -0.08879722072777696 -2.825573378819097&#8243; fill=&#8221;none&#8221; stroke=&#8221;url(#grad1)&#8221; stroke-width=&#8221;5&#8243; stroke-linecap=&#8221;round&#8221;&gt;&lt;\/path&gt; \u767b\u5f55\u540e\u590d\u5236 \u662f\u5426\u53ef\u4ee5\u901a\u8fc7svg\u5b9e\u73b0\u73af\u5f62\u6e10\u53d8\uff1f \u76ee\u524dsvg\u4ec5\u652f\u6301\u7ebf\u6027\u6e10\u53d8\u548c\u5f84\u5411\u6e10\u53d8\u3002\u65e0\u6cd5\u5b9e\u73b0\u4e0e\u4e2dconic-gradient\u4e00\u6837\u7684\u73af\u5f62\u6e10\u53d8\u3002 \u89e3\u51b3\u65b9\u6cd5 \u53ef\u4ee5\u4f7f\u7528clippath\u548cforeignobject\u914d\u5408css\u5b9e\u73b0\u73af\u5f62\u6e10\u53d8\uff0c\u5177\u4f53\u65b9\u6cd5\u53ef\u4ee5\u53c2\u8003\uff1a my struggle to use and animate a conic gradient in svg \u4ee5\u4e0a\u5c31\u662fSVG \u80fd\u5b9e\u73b0\u771f\u6b63\u7684\u73af\u5f62\u6e10\u53d8\u5417\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-27796","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27796","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=27796"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27796\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}