{"id":8453,"date":"2019-02-02T22:47:00","date_gmt":"2019-02-02T14:47:00","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=8453"},"modified":"2019-02-02T22:56:15","modified_gmt":"2019-02-02T14:56:15","slug":"css-css3-shapes","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2019\/02\/css-css3-shapes\/","title":{"rendered":"\u5199\u7ed9\u81ea\u5df1\u770b\u7684CSS shapes\u5e03\u5c40\u6559\u7a0b"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=8453\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=8453<\/a><br \/>\n\u672c\u6587\u53ef\u5168\u6587\u8f6c\u8f7d\uff0c\u4e2a\u4eba\u7f51\u7ad9\u65e0\u9700\u6388\u6743\uff0c\u53ea\u8981\u4fdd\u7559\u539f\u4f5c\u8005\u3001\u51fa\u5904\u4ee5\u53ca\u6587\u4e2d\u94fe\u63a5\u5373\u53ef\uff0c\u4efb\u4f55\u7f51\u7ad9\u5747\u53ef\u6458\u8981\u805a\u5408\uff0c\u5546\u7528\u8bf7\u8054\u7cfb\u6388\u6743\u3002<br \/>\n<script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/201902-css-shapes.jpg';<\/script><\/p>\n<h3>\u4e00\u3001\u524d\u8a00&amp;\u7d22\u5f15<\/h3>\n<p>CSS Shapes\u5e03\u5c40\u53ef\u4ee5\u5b9e\u73b0\u4e0d\u89c4\u5219\u7684\u6587\u5b57\u73af\u7ed5\u6548\u679c\uff0c\u9700\u8981\u548c\u6d6e\u52a8\u914d\u5408\u4f7f\u7528\u3002<\/p>\n<p>\u517c\u5bb9\u6027\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201901\/2019-01-31_222820.png\" width=\"489\" height=\"212\" alt=\"\u73af\u7ed5\u5e03\u5c40\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u8fd8\u662f\u5f88\u4e0d\u9519\u7684\uff0c\u79fb\u52a8\u7aef\u53ef\u7528\uff0c\u5185\u90e8\u4e2d\u540e\u53f0\u9879\u76ee\u53ef\u7528\u3002<\/p>\n<p>CSS shapes\u5e03\u5c40\u76f8\u5173\u5c5e\u6027\u5e76\u4e0d\u591a\uff0c\u5b66\u4e60\u6210\u672c\u6bd4grid\u5e03\u5c40\uff0cflex\u5e03\u5c40\u5c0f\u5f88\u591a\u3002<\/p>\n<table border=\"0\" width=\"100%\" class=\"params_table\" cellspacing=\"1\" style=\"max-width:200px;\">\n<thead>\n<tr>\n<th>Shapes\u5e03\u5c40\u76f8\u5173\u5c5e\u6027<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"vertical-align: top;\">\n<ul>\n<li><a href=\"#shape-outside\" title=\"\u5f62\u72b6\">shape-outside<\/a><\/li>\n<li><a href=\"#shape-margin\" title=\"\u95f4\u8ddd\">shape-margin<\/a><\/li>\n<li><a href=\"#shape-image-threshold\" title=\"\u56fe\u5f62\u56fe\u7247\u7684\u9608\u503c\">shape-image-threshold<\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"shape-outside\">\u4e8c\u3001\u8be6\u7ec6\u4e86\u89e3shape-outside<\/h3>\n<p><code>shape-outside<\/code>\u662f\u4e0d\u89c4\u5219\u5f62\u72b6\u73af\u7ed5\u5e03\u5c40\u7684\u6838\u5fc3\uff0c\u652f\u6301\u7684\u5c5e\u6027\u503c\u5206\u4e3a\u5982\u4e0b\u56db\u5927\u7c7b\uff1a<\/p>\n<ol style=\"font-weight:700;\">\n<li>none &#8211; \u9ed8\u8ba4\u503c<\/li>\n<li>&lt;shape-box&gt; &#8211; \u56fe\u5f62\u76d2\u5b50\u3002<\/li>\n<li>&lt;basic-shape&gt; &#8211; \u57fa\u672c\u56fe\u5f62\u51fd\u6570\u3002<\/li>\n<li>&lt;image&gt; &#8211; \u56fe\u50cf\u7c7b\u3002<\/li>\n<\/ol>\n<p>\u5176\u4e2d\uff1a<\/p>\n<ul>\n<li><code>none<\/code>\u5f88\u597d\u7406\u89e3\uff0c\u8868\u793a\u5c31\u662f\u666e\u901a\u7684\u77e9\u5f62\u73af\u7ed5\u3002<\/li>\n<li><code>&lt;shape-box&gt;<\/code>\uff08\u56fe\u5f62\u76d2\u5b50\uff09\u662fshape\u76f8\u5173\u5e03\u5c40\u4e2d\u7684\u4e00\u4e2a\u540d\u8bcd\uff0c\u6bd4<code>clip-path<\/code>\u5c5e\u6027\u4e2d\u7684<code>&lt;geometry-box&gt;<\/code>\uff08\u51e0\u4f55\u76d2\u5b50\uff09\u652f\u6301\u7684\u76d2\u5b50\u8981\u5c11\u4e00\u4e9b\uff0c\u5c31\u662fCSS2.1\u4e2d\u7684\u57fa\u672c\u76d2\u6a21\u578b\u76844\u79cd\u76d2\u5b50\uff0c\u5206\u522b\u662f<code>margin-box<\/code>\uff0c<code>border-box<\/code>\uff0c<code>padding-box<\/code>\u548c<code>content-box<\/code>\u3002\u8981\u6765\u6307\u5b9a\u6587\u5b57\u73af\u7ed5\u7684\u65f6\u5019\u662f\u4f9d\u7167\u54ea\u4e2a\u76d2\u5b50\u7684\u8fb9\u7f18\u6765\u8ba1\u7b97\u7684\u3002\n<\/li>\n<li><code>&lt;basic-shape&gt;<\/code>\u6307\u7684\u662f\u57fa\u672c\u5f62\u72b6\u51fd\u6570\uff0c\u548cCSS <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2014\/12\/css3-svg-clip-path\/\">clip-path\u526a\u88c1\u5c5e\u6027<\/a>\u652f\u6301\u7684\u57fa\u672c\u5f62\u72b6\u51fd\u6570\u4e00\u6a21\u4e00\u6837\u3002<\/li>\n<li><code>&lt;image&gt;<\/code>\u503c\u7684\u662f\u56fe\u50cf\u7c7b\uff0c\u5305\u62ecURL\u94fe\u63a5\u56fe\u7247\uff0c\u6e10\u53d8\u56fe\u50cf\uff0c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2012\/09\/css3-background-image-cross-fade\/\">cross-fade()<\/a>\uff0c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=1758\">element()<\/a>\u7b49\u3002\u6240\u6709\u8fd9\u4e9b\u56fe\u50cf\u7c7b\uff0c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2017\/11\/css-css3-mask-masks\/\">CSS3 mask\u906e\u7f69\u5c5e\u6027<\/a>\u4e5f\u90fd\u652f\u6301\uff0c\u672c\u6587\u53ea\u4f1a\u4ecb\u7ecd\u5e38\u7528\u7684URL\u94fe\u63a5\u548c\u6e10\u53d8\u56fe\u50cf\uff0c\u5176\u4ed6\u56fe\u7247\u7c7b\u4e0d\u4ecb\u7ecd\uff0c\u6709\u5174\u8da3\u53ef\u4ee5\u8bbf\u95ee<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2017\/11\/css-css3-mask-masks\/\">\u4ecb\u7ecd\u906e\u7f69\u7684\u8fd9\u7bc7\u6587\u7ae0<\/a>\uff0c\u6709\u5b8c\u5168\u5c55\u793a\u3002<\/li>\n<\/ul>\n<p>\u4e0d\u540c\u7c7b\u578b\u5c5e\u6027\u503c\u4f7f\u7528\u793a\u610f\uff08\u53d6\u81ea<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/shape-outside\" rel=\"noopener\" target=\"_blank\">MDN<\/a>\uff09\uff1a<\/p>\n<pre><span style=\"color:green;\">\/* \u5173\u952e\u5b57\u503c *\/<\/span>\r\nshape-outside: none;\r\nshape-outside: margin-box;\r\nshape-outside: content-box;\r\nshape-outside: border-box;\r\nshape-outside: padding-box;\r\n\r\n<span style=\"color:green;\">\/* \u51fd\u6570\u503c *\/<\/span>\r\nshape-outside: circle();\r\nshape-outside: ellipse();\r\nshape-outside: inset(10px 10px 10px 10px);\r\nshape-outside: polygon(10px 10px, 20px 20px, 30px 30px);\r\n\r\n<span style=\"color:green;\">\/* &lt;url&gt;\u503c *\/<\/span>\r\nshape-outside: url(image.png);\r\n\r\n<span style=\"color:green;\">\/* \u6e10\u53d8\u503c *\/<\/span>\r\nshape-outside: linear-gradient(45deg, rgba(255, 255, 255, 0) 150px, red 150px);<\/pre>\n<p>\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u4e00\u4e2a\u5b9e\u4f8b\u5feb\u901f\u4e86\u89e3\u4e0b\u5404\u4e2a\u7c7b\u578b\u5c5e\u6027\u503c\u7684\u4f5c\u7528\u548c\u8868\u73b0\u3002<\/p>\n<h4>1. \u5173\u952e\u5b57\u5c5e\u6027\u503c<\/h4>\n<p>\u6d4b\u8bd5HTML\u548cCSS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;span class=\"shape\"&gt;&lt;\/span&gt;\r\n&lt;p&gt;\u5728CSS Shapes\u95ee\u4e16\u4e4b\u524d...&lt;\/p&gt;<\/pre>\n<pre>.shape {\r\n    float: left;\r\n    width: 60px; height: 60px;\r\n    padding: 10px; margin: 10px;\r\n    border: 10px solid;\r\n    border-radius: 50%;\r\n    background-color: currentColor;\r\n    background-clip: content-box;\r\n    color: #cd0000;\r\n    shape-outside: none;  <span style=\"color:green;\">\/* \u6216margin-box\uff0cborder-box\uff0cpadding-box\uff0ccontent-box *\/<\/span>\r\n}<\/pre>\n<p>\u7ed3\u679c\u5e03\u5c40\u8868\u73b0\u5982\u4e0bGIF\u622a\u5c4f\u793a\u610f\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201901\/shape-outside-keywords.gif\" width=\"421\" height=\"343\" alt=\"\u4e0d\u540c\u5173\u952e\u5b57\u5c5e\u6027\u503c\u7684\u73af\u7ed5\u8868\u73b0\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u5f53<code>shape-outside<\/code>\u5c5e\u6027\u503c\u4e3a<code>none<\/code>\u4ee5\u5916\u7684\u5176\u4ed6\u5173\u952e\u5b57\u7684\u65f6\u5019\uff0c\u5c31\u7b97\u662f\u666e\u901a\u7684<code>border-radius<\/code>\u5706\u89d2\u4e5f\u80fd\u5b9e\u73b0\u73af\u7ed5\u6548\u679c\u3002<\/p>\n<p>\u773c\u89c1\u4e3a\u5b9e\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u7684\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201901\/css-shape-outside-keywords-demo.php\" rel=\"noopener\" target=\"_blank\">CSS shape-outside\u5173\u952e\u5b57\u5c5e\u6027\u503c\u6d4b\u8bd5demo<\/a><\/p>\n<h4>2. \u57fa\u672c\u7684\u5f62\u72b6\u51fd\u6570<\/h4>\n<p>\u6307\u7684\u662f\u4e0b\u9762\u8fd9\u56db\u4e2a\u57fa\u672c\u7684\u5f62\u72b6\u51fd\u6570\uff1a<\/p>\n<ul>\n<li>circle() &#8211; \u5706<\/li>\n<li>ellipse() &#8211; \u692d\u5706<\/li>\n<li>inset() &#8211; \u5185\u77e9\u5f62\uff08\u5305\u62ec\u5706\u89d2\u77e9\u5f62\uff09<\/li>\n<li>polygon() &#8211; \u591a\u8fb9\u5f62<\/li>\n<\/ul>\n<p>\u5176\u4e2d\uff1a<\/p>\n<p><strong>circle() &#8211; \u5706<\/strong><br \/>\n\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>circle( [&lt;shape-radius&gt;]? [at &lt;position&gt;]? )<\/pre>\n<p>\u5176\u4e2d\u95ee\u53f7<code>?<\/code>\u662f\u6b63\u5219\u8868\u8fbe\u5f0f\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\uff0c\u8868\u793a<code>0<\/code>\u548c<code>1<\/code>\uff0c\u4e5f\u5c31\u662f\u8bf4<code>shape-radius<\/code>\uff08\u5706\u534a\u5f84\uff09\u548c<code>position<\/code>\uff08\u5706\u5fc3\u4f4d\u7f6e\uff09\u90fd\u662f\u53ef\u4ee5\u7f3a\u7701\u7684\uff0c\u8868\u793a\u3002\u56e0\u6b64\uff0c\u4e0b\u9762\u7684\u5199\u6cd5\u90fd\u662f\u5408\u6cd5\u7684\uff1a<\/p>\n<pre>shape-outside: circle();\r\nshape-outside: circle(50%);\r\nshape-outside: circle(at 50% 50%);\r\nshape-outside: circle(50% at 50% 50%);\r\nshape-outside: circle(50px at 50px 50px);<\/pre>\n<p>\u53ef\u4ee5\u5b9e\u73b0\u7c7b\u4f3c\u4e0b\u56fe\u7684\u73af\u7ed5\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-01_232933.png\" width=\"254\" height=\"225\" alt=\"\u5706\u5f62\u73af\u7ed5\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u548c\u5173\u952e\u5b57\u5c5e\u6027\u503c\u52a0<code>border-radius<\/code>\u5b9e\u73b0\u7684\u5706\u5f62\u73af\u7ed5\u76f8\u6bd4\uff0c<code>circle()<\/code>\u5f97\u5b9e\u73b0\u76f8\u5bf9\u66f4\u52a0\u7075\u6d3b\u4e00\u4e9b\uff0c\u6bd4\u65b9\u8bf4\u60f3\u5f04\u4e00\u4e2a\u534a\u5706\u7684\u73af\u7ed5\u6548\u679c\uff0c\u53ef\u4ee5\uff1a<\/p>\n<pre>shape-outside: circle(50% at 0% 50%);<\/pre>\n<p>\u7ed3\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-01_233157.png\" width=\"303\" height=\"223\" alt=\"\u534a\u5706\u73af\u7ed5\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p><strong>ellipse() &#8211; \u692d\u5706<\/strong><\/p>\n<p>\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>ellipse( [&lt;shape-radius&gt;{2}]? [at &lt;position&gt;]? )<\/pre>\n<p>x\u8f74\u534a\u5f84\uff0cy\u8f74\u534a\u5f84\uff0c\u4ee5\u53ca\u692d\u5706\u7684\u5706\u5fc3\u4f4d\u7f6e\u3002\u4ee5\u4e0b\u90fd\u662f\u5408\u6cd5\u7684\uff1a<\/p>\n<pre>shape-outside: ellipse();\r\nshape-outside: ellipse(50px 75px);\r\nshape-outside: ellipse(at 50% 50%);\r\nshape-outside: ellipse(50px 75px at 50% 50%);<\/pre>\n<p>x\uff0cy\u534a\u5f84\u9664\u4e86\u5177\u4f53\u6570\u503c\uff0c\u8fd8\u652f\u6301<code>farthest-side<\/code>\u548c<code>closest-side<\/code>\u8fd9\u4e24\u4e2a\u5173\u952e\u5b57\uff0c\u987e\u540d\u601d\u4e49\uff0c\u5206\u522b\u8868\u793a\u5230\u6700\u957f\u8fb9\u7684\u957f\u5ea6\u548c\u6700\u77ed\u8fb9\u7684\u957f\u5ea6\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>ellipse(farthest-side closest-side at 25% 25%)<\/pre>\n<p>\u8868\u793a\u5728\u6d6e\u52a8\u5143\u7d20<code>25% 25%<\/code>\u4f4d\u7f6e\uff0c\u4ee5\u8ddd\u79bb\u6d6e\u52a8\u5143\u7d20\u6700\u957f\u8fb9\u7684\u8ddd\u79bb\u4f5c\u4e3a\u692d\u5706\u7684x\u5750\u6807\uff0c\u4ee5\u8ddd\u79bb\u6d6e\u52a8\u5143\u7d20\u8fb9\u7f18\u6700\u77ed\u7684\u8ddd\u79bb\u4f5c\u4e3a\u692d\u5706\u7684y\u5750\u6807\u3002\u4e8e\u662f\uff0c\u6709\u5982\u4e0b\u7684\u6548\u679c\u56fe\uff08\u6d6e\u52a8\u5143\u7d20\u5c3a\u5bf8100*100\uff0c\u7ea2\u8272\u70b9\u6807\u8bb0\u662f<code>25% 25%<\/code>\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u770b\u51fa\u692d\u5706\u7684\u8f6e\u5ed3\uff09\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-01_234904.png\" width=\"347\" height=\"237\" alt=\"\u6700\u957f\u8fb9\u548c\u6700\u77ed\u8fb9\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5982\u679c\u6211\u4eec\u8c03\u6362\u4e00\u4e0b\u987a\u5e8f\uff0c\u628a\u6700\u77ed\u8fb9\u4f5c\u4e3ax\u8f74\uff0c\u6700\u957f\u8fb9\u4f5c\u4e3ay\u8f74\uff1a<\/p>\n<pre>ellipse(closest-side farthest-side at 25% 25%)<\/pre>\n<p>\u5219\u6700\u7ec8\u7684\u8868\u73b0\u5982\u4e0b\u622a\u56fe\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-01_235220.png\" width=\"247\" height=\"259\" alt=\"\u6700\u77ed\u8fb9\u548c\u6700\u957f\u8fb9\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4ed4\u7ec6\u89c2\u5bdf\uff0c\u5c31\u4e0d\u96be\u7406\u89e3<code>farthest-side<\/code>\u548c<code>closest-side<\/code>\u7684\u610f\u601d\u4e86\u3002<\/p>\n<p><strong>inset() &#8211; \u5185\u77e9\u5f62\uff08\u5305\u62ec\u5706\u89d2\u77e9\u5f62\uff09<\/strong><\/p>\n<p>\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>inset( &lt;shape-arg&gt;{1,4} [round &lt;border-radius&gt;]? )<\/pre>\n<p>\u5176\u4e2d<code>shape-arg<\/code>\u662f\u5fc5\u987b\u53c2\u6570\uff0c\u53ef\u4ee5\u662f1~4\u4e2a\u503c\u3002\u5f53\u63d0\u4f9b\u6240\u6709\u524d\u56db\u4e2a\u53c2\u6570\u65f6\uff0c\u5b83\u4eec\u8868\u793a\u4ece\u53c2\u8003\u6846\u5411\u5185\u7684\u9876\u90e8\uff0c\u53f3\u4fa7\uff0c\u5e95\u90e8\u548c\u5de6\u4fa7\u504f\u79fb\uff0c\u4e5f\u5c31\u662f\u5b9a\u4e49\u4e86\u63d2\u5165\u7684\u77e9\u5f62\u7684\u8fb9\u7f18\u4f4d\u7f6e\u3002 \u8fd9\u4e9b\u53c2\u6570\u9075\u5faa\u8fb9\u8ddd\u7f29\u5199\u7684\u8bed\u6cd5\uff08\u7c7b\u4f3c<code>margin<\/code>\u3001<code>padding<\/code>\u7b49\u5c5e\u6027\uff09\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u75281\u4e2a\uff0c2\u4e2a\uff0c3\u4e2a\u62164\u4e2a\u503c\u3002<code>border-radius<\/code>\u8868\u793a\u5706\u89d2\u5927\u5c0f\uff0c\u53ef\u4ee5\u7f3a\u7701\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u4e0b\u9762\u8fd9\u4e9b\u5199\u6cd5\u90fd\u662f\u5408\u6cd5\u7684\uff1a<\/p>\n<pre>shape-outside: inset(10px);\r\nshape-outside: inset(10px 20px);\r\nshape-outside: inset(10px 20px 30px);\r\nshape-outside: inset(10px 20px 30px 40px);\r\nshape-outside: inset(10px 20px 30px 40px round 10px);<\/pre>\n<p>\u4f8b\u5982\u4e0a\u9762\u6700\u540e\u4e00\u884c\u4ee3\u7801\u6548\u679c\u4e3a\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_003151.png\" width=\"280\" height=\"220\" alt=\"\u5185\u5706\u89d2\u77e9\u5f62\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u63a7\u5236\u53f0\u67e5\u770b\u5143\u7d20\u76d2\u5b50\u53ef\u4ee5\u770b\u5230\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_003039.png\" width=\"310\" height=\"237\" alt=\"\u5706\u89d2\u73af\u7ed5\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p><strong>polygon() &#8211; \u591a\u8fb9\u5f62<\/strong><\/p>\n<p><code>polygon()<\/code>\u591a\u8fb9\u5f62\u53cd\u800c\u662f\u8bed\u6cd5\u6700\u597d\u7406\u89e3\u7684\uff1a<\/p>\n<pre>polygon( [&lt;fill-rule&gt;,]? [&lt;shape-arg&gt; &lt;shape-arg&gt;]# )<\/pre>\n<p><code>fill-rule<\/code>\u8868\u793a\u586b\u5145\u89c4\u5219\uff0c\u53ef\u4ee5\u662f<code>nonzero<\/code>\u4ee5\u53ca<code>evenodd<\/code>\uff0c\u9ed8\u8ba4\u503c\u662f<code>nonzero<\/code>\u3002\u8fd9\u4e24\u4e2a\u586b\u5145\u89c4\u5219\u662f\u56fe\u5f62\u9886\u57df\u5fc5\u987b\u8981\u638c\u63e1\u7684\u57fa\u7840\u77e5\u8bc6\uff0c\u53ef\u4ee5\u53c2\u89c1\u6211\u4e4b\u524d\u7684\u6587\u7ae0\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2018\/10\/nonzero-evenodd-fill-mode-rule\/\">\u641e\u61c2SVG\/Canvas\u4e2dnonzero\u548cevenodd\u586b\u5145\u89c4\u5219<\/a>\u201d\u8fdb\u884c\u5b66\u4e60\u3002<\/p>\n<p>\u573a\u666f<code>polygon<\/code>\u7528\u6cd5\u5c31\u662f\uff1a<\/p>\n<pre>polygon( x1 y1, x2 y2, x3 y3, ... )<\/pre>\n<p>\u5c31\u662f\u4e00\u4e2a\u4e00\u4e2a\u591a\u8fb9\u5f62\u7684\u70b9\u5750\u6807\u3002<\/p>\n<pre>shape-outside: polygon(0 0, 0 100px, 100px 200px);\r\nshape-outside: polygon(0 0, 100px 0, 0 50px, 100px 100px, 0 100px);<\/pre>\n<p>\u6548\u679c\u793a\u610f\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_003834.png\" width=\"309\" height=\"214\" alt=\"\u591a\u8fb9\u5f62\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_003757.png\" width=\"307\" height=\"232\" alt=\"\u591a\u8fb9\u5f62\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p><span class=\"s\">\/\/zxx: Firefox\u6d4f\u89c8\u5668\u5185\u7f6e\u4e86\u4e00\u4e2a\u5f62\u72b6\u7f16\u8f91\u5668\uff0c\u4f60\u53ef\u4ee5\u5728 Inspector \u4e2d\u901a\u8fc7\u70b9\u51fb\u591a\u8fb9\u5f62\u53ef\u89c6\u5316\u751f\u6210\u6211\u4eec\u9700\u8981\u7684<code>polygon()<\/code>\u5750\u6807\u4ee3\u7801\u3002<\/span><\/p>\n<hr>\n<p><strong>\u590d\u76d8\u6c47\u603b<\/strong><\/p>\n<p>\u4e0a\u9762\u63d0\u5230\u7684\u6240\u6709shape\u51fd\u6570\u90fd\u6709demo\u53ef\u4ee5\u4f53\u9a8c\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201901\/css-shape-outside-function-demo.php\" rel=\"noopener\" target=\"_blank\">CSS shape-outside\u57fa\u672c\u5f62\u72b6\u6d4b\u8bd5demo<\/a><\/p>\n<p>\u7ea2\u8272\u7684\u56fe\u5f62\u53ea\u662f\u4e3a\u4e86\u65b9\u4fbf\u8ba9\u5927\u5bb6\u77e5\u9053\u5f62\u72b6\u662f\u600e\u4e48\u6837\u5b50\u7684\uff0c\u5b9e\u9645\u5f00\u53d1\u7684\u65f6\u5019\u53ef\u4ee5\u76f4\u63a5\u7701\u7565\uff0c\u6216\u8005\u6362\u6210\u5176\u4ed6\u5b57\u7b26\u6216\u8005\u4f4d\u56fe\uff0c\u5982\u7167\u7247\uff0c\u98ce\u666f\u753b\uff0c\u63d2\u753b\u7b49\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_004712.png\" width=\"421\" height=\"304\" alt=\"\u5b57\u7b26\u73af\u7ed5\u6392\u7248\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<h4>3. \u56fe\u50cf\u7c7b<\/h4>\n<p>\u56fe\u50cf\u7c7b\u53ea\u4e3eURL\u548c\u6e10\u53d8\u7684\u4f8b\u5b50\uff0c\u56e0\u4e3a\u8fd9\u4e24\u79cd\u7c7b\u578b\u6700\u5e38\u7528\u3002<\/p>\n<p><strong>URL\u4e0d\u89c4\u5219\u56fe\u5f62<\/strong><\/p>\n<p>\u5df2\u77e5\u6709\u4e2a\u56fd\u5bb6\u4e8c\u7ea7\u4fdd\u62a4\u52a8\u7269\u9e66\u9e49\u7684PNG\u56fe\u5f62\uff0c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/birds.png\" width=\"181\" height=\"297\" alt=\"\u9e66\u9e49\u7167\u7247\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5982\u4e0bCSS\u4ee3\u7801\uff0c\u5c31\u53ef\u4ee5\u5b9e\u73b0\u6587\u5b57\u73af\u7ed5\u8fd9\u4e2a\u9e66\u9e49\u8f6e\u5ed3\u5e03\u5c40\u6548\u679c\uff1a<\/p>\n<pre>.shape {\r\n    float: left;\r\n    width: 200px; height: 300px;\r\n    <span style=\"color:green;\">\/* \u6587\u5b57\u73af\u7ed5\u8fd9\u4e2a\u9e66\u9e49 *\/<\/span>\r\n    shape-outside: url(.\/birds.png);\r\n    <span style=\"color:green;\">\/* \u9e66\u9e49\u8d4b\u8272\u5e76\u663e\u793a *\/<\/span>\r\n    background-color: #cd0000;\r\n    -webkit-mask: url(.\/birds.png) no-repeat;\r\n    mask: url(.\/birds.png) no-repeat;\r\n}<\/pre>\n<p>\u5b9e\u73b0\u7684\u6548\u679c\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_203752.png\" width=\"487\" height=\"391\" alt=\"\u6587\u5b57\u73af\u7ed5\u9e66\u9e49\u663e\u793a\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u8fd9\u4e2a\u6548\u679c\u6709\u4e13\u95e8\u7684demo\u9875\u9762\u7684\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u7684\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201901\/css-shape-outside-url-image-demo.php\" rel=\"noopener\" target=\"_blank\">CSS shape-outside PNG\u56fe\u7247\u73af\u7ed5demo<\/a><\/p>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><code>url()<\/code>\u94fe\u63a5\u7684\u56fe\u7247\u5c3a\u5bf8\u65e0\u6cd5\u4fee\u6539\uff1b<code>url()<\/code>\u94fe\u63a5\u7684\u56fe\u7247\u4e0d\u80fd\u8de8\u57df\uff0c\u5426\u5219\u4f1a\u6ca1\u6709\u6548\u679c\uff0c\u56e0\u4e3a\u6ca1\u6709\u517c\u5bb9CORS\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\u63a7\u5236\u53f0\uff0c\u4f1a\u770b\u5230\u7c7b\u4f3c\u4e0b\u56fe\u7684\u62a5\u9519\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_204152.png\" width=\"456\" height=\"157\" alt=\"\u8de8\u57df\u51fa\u9519\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6b64\u65f6\u9700\u8981\u5728\u670d\u52a1\u5668\u4fa7\uff0c\u6216\u8005CDN\u90a3\u91cc\u914d\u7f6e&#8217;Access-Control-Allow-Origin&#8217;\u5934\u5305\u542b\u5f53\u524d\u9875\u9762\u7684\u57df\u540d\u3002<\/p>\n<p><strong>gradient\u6e10\u53d8\u4e0e\u73af\u7ed5<\/strong><\/p>\n<p>\u8fd9\u91cc\u7684\u6e10\u53d8\u53ef\u4ee5\u662f<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=3639\">\u7ebf\u6027\u6e10\u53d8<\/a>\u4e5f\u53ef\u4ee5\u662f<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2017\/11\/css3-radial-gradient-syntax-example\/\">\u5f84\u5411\u6e10\u53d8<\/a>\uff0c\u4ee5\u53carepeat\u6e10\u53d8\u3002<\/p>\n<p>\u4f8b\u5982\u7ed8\u5236\u659c\u5411\u7ebf\u6027\u6e10\u53d8\uff0cCSS\u5982\u4e0b\uff1a<\/p>\n<pre>.shape {\r\n    float: left;\r\n    width: 150px; height: 120px;\r\n    --gradient: linear-gradient(to right bottom, #cd0000, transparent 50%, transparent 90%, #cd0000);\r\n    shape-outside: var(--gradient);\r\n    background: var(--gradient);\r\n}<\/pre>\n<p>\u7ed3\u679c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/2019-02-02_205650.png\" width=\"381\" height=\"241\" alt=\"\u6e10\u53d8\u4e0e\u5f62\u72b6\u73af\u7ed5demo\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<p>Shape\u5e03\u5c40\u4e2d\u6709\u4e2aCSS\u5c5e\u6027\u540d\u4e3a<code><a href=\"#shape-image-threshold\">shape-image-threshold<\/a><\/code>\uff0c\u53ef\u4ee5\u6307\u5b9a\u6587\u5b57\u73af\u7ed5\u56fe\u50cf\u7684\u8fb9\u754c\u900f\u660e\u5ea6\u503c\u3002\u8fd9\u4e2a\u540e\u9762\u4f1a\u4ecb\u7ecd\u3002<\/p>\n<h3 id=\"shape-margin\">\u4e09\u3001\u4e86\u89e3shape-margin<\/h3>\n<p><code>shape-margin<\/code>\u5f88\u597d\u7406\u89e3\uff0c\u5c31\u662f\u6587\u5b57\u73af\u7ed5\u56fe\u5f62\u65f6\u5019\uff0c\u8ddd\u79bb\u8fb9\u754c\u7684\u4f4d\u7f6e\uff0c\u8fd9\u4e2a\u5c5e\u6027\u5f88\u6709\u7528\u3002\u56e0\u4e3a\u5728Shape\u5e03\u5c40\u4e2d\uff0c\u6587\u5b57\u73af\u7ed5\u6709\u65f6\u5019\u662f\u65e0\u89c6<code>margin<\/code>\u5c5e\u6027\u7684\uff0c\u60f3\u8981\u6491\u5f00\u95f4\u8ddd\uff0c\u591a\u534a\u8fd8\u5f97\u7528<code>shape-margin<\/code>\u5c5e\u6027\u3002<\/p>\n<p>\u7528\u6cd5\u793a\u610f\uff1a<\/p>\n<pre><span style=\"color:green;\">\/* \u957f\u5ea6\u503c *\/<\/span>\r\nshape-margin: 10px;\r\nshape-margin: 20mm;\r\n\r\n<span style=\"color:green;\">\/* \u767e\u5206\u6bd4\u503c *\/<\/span>\r\nshape-margin: 60%;<\/pre>\n<p>\u867d\u7136\u8be5\u5c5e\u6027\u5305\u542b\u4e86<code>margin<\/code>\uff0c\u4f46\u662f\u884c\u4e3a\u8868\u73b0\u548cCSS\u7684<code>margin<\/code>\u5c5e\u6027\u5374\u6709\u5f88\u5927\u7684\u5dee\u522b\u3002\u9996\u5148\uff0c<code>shape-margin<\/code>\u53ea\u652f\u63011\u4e2a\u503c\uff0c<code>margin<\/code>\u52191~4\u4e2a\uff1b\u7136\u540e<code>shape-margin<\/code>\u7684\u6709\u6548\u6570\u503c\u8303\u56f4\u662f\u6709\u9650\u5236\u7684\uff0c\u4ece0\u5230\u6d6e\u52a8\u5143\u7d20\u7684\u8fb9\u754c\uff08\u6b64\u65f6\u5e03\u5c40\u6548\u679c\u8868\u73b0\u5982\u540c\u666e\u901a\u6d6e\u52a8\u5e03\u5c40\uff09\u3002<\/p>\n<p>\u62ff\u5c0f\u9e66\u9e49\u6848\u4f8b\u4e3e\u4f8b\u5427\uff0c\u4e0d\u540c<code>shape-margin<\/code>\u503c\u7684\u8868\u73b0\u5206\u522b\u5982\u4e0bgif\u52a8\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/shape-margin.gif\" width=\"437\" height=\"380\" alt=\"shape-margin\u4e0d\u540c\u503c\u7684\u73af\u7ed5\u8868\u73b0gif\u5f55\u5c4f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u5f53<code>shape-margin<\/code>\u7684\u503c\u8d85\u8fc7\u4e00\u5b9a\u7684\u6570\u91cf\u7684\u65f6\u5019\uff08\u8d85\u8fc7\u4e86\u6d6e\u52a8\u5143\u7d20\u7684\u76d2\u5b50\u7684\u8fb9\u754c\uff09\uff0c\u6b64\u65f6\uff0c\u770b\u4e0d\u5230\u4efb\u4f55\u7684\u53d8\u5316\u4e86\uff0c\u4e5f\u5c31\u662f\uff0c<code>shape-margin<\/code>\u53ea\u80fd\u63a7\u5236\u4e0d\u89c4\u5219\u73af\u7ed5\u7684\u95f4\u8ddd\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201901\/css-shape-margin-demo.php\" rel=\"noopener\" target=\"_blank\">CSS shape-margin\u6d4b\u8bd5demo<\/a><\/p>\n<h3 id=\"shape-image-threshold\">\u56db\u3001\u4e86\u89e3shape-image-threshold<\/h3>\n<p>threshold\u8fd9\u4e2a\u5355\u8bcd\u662f\u201c\u9608(yu)\u503c\u201d\u7684\u610f\u601d\uff0c<code>shape-image-threshold<\/code>\u6307\u56fe\u50cf\u73af\u7ed5\u65f6\u5019\u7684\u534a\u900f\u660e\u9608\u503c\uff0c\u9ed8\u8ba4\u662f<code>0.0<\/code>\uff0c\u4e5f\u5c31\u662f\u56fe\u50cf\u900f\u660e\u5ea6\u4e3a<code>0<\/code>\u7684\u533a\u57df\u8fb9\u754c\u624d\u80fd\u73af\u7ed5\u3002\u540c\u7406\uff0c\u5982\u679c\u503c\u662f<code>0.5<\/code>\u8868\u793a\u900f\u660e\u5ea6\u5c0f\u4e8e0.5\u7684\u533a\u57df\u90fd\u53ef\u4ee5\u6587\u5b57\u73af\u7ed5\u3002<\/p>\n<p>\u8fd9\u4e2a\u5c5e\u6027\u4e5f\u975e\u5e38\u5b9e\u7528\uff0c\u4e5f\u5f88\u597d\u7406\u89e3\uff0c\u4f8b\u5982\uff0c\u6211\u4eec\u5199\u4e00\u4e2a\u5b9e\u8272\u5230\u900f\u660e\u7684\u503e\u659c\u7ebf\u6027\u6e10\u53d8\uff0c\u5219\u4ece0~1\u7684\u900f\u660e\u5ea6\u90fd\u8986\u76d6\u5230\u4e86\uff0c\u6b64\u65f6\uff0c\u4e0d\u540c\u7684<code>shape-image-threshold<\/code>\u503c\u5219\u4f1a\u4ea7\u751f\u4e0d\u540c\u7684\u5e03\u5c40\u53d8\u5316\uff0c\u5982\u4e0bGIF\u56fe\u793a\u610f\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/shape-image-threshold.gif\" width=\"412\" height=\"340\" alt=\"\u4e0d\u540c\u900f\u660e\u5ea6\u9608\u503c\u7684\u6587\u5b57\u73af\u7ed5\u8868\u73b0\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5206\u522b\u5c55\u793a\u4e86\u5982\u4e0b\u9608\u503c\u7684\u73af\u7ed5\u8868\u73b0\uff1a<\/p>\n<pre>shape-image-threshold: 0.0;\r\nshape-image-threshold: 0.3;\r\nshape-image-threshold: 0.6;\r\nshape-image-threshold: 0.8;<\/pre>\n<p>\u773c\u89c1\u4e3a\u5b9e\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201901\/css-shape-image-threshold-demo.php\" rel=\"noopener\" target=\"_blank\">CSS\u4e0d\u540cshape-image-threshold\u503c\u6d4b\u8bd5demo<\/a><\/p>\n<h3>\u4e94\u3001\u6848\u4f8b\uff1aiPhone X\u5218\u6d77\u5934<\/h3>\n<p>\u5b9e\u73b0\u73af\u7ed5iPhone X\u5218\u6d77\u5934\u7684\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/wx1.sinaimg.cn\/mw690\/4b4d632fgy1fjo5qvf2zvg208e0dnacs.gif\" width=\"302\" height=\"491\" alt=\"shape-outside url\u5b9e\u73b0\u7684\u73af\u7ed5\u5217\u8868\u6548\u679c\" onerror=\"this.src='\/\/image.zhangxinxu.com\/image\/blog\/201902\/iphonex-shapes.gif';\" class=\"alignnone\"><\/p>\n<p>\u8fd9\u662f\u62112\u5e74\u524d\u7684iPhone X\u521a\u51fa\u6765\u5b9e\u73b0\u4ecb\u7ecd\u7684\u5e03\u5c40\u5b9e\u73b0\uff0c\u5c31\u662f\u501f\u52a9CSS Shapes\u5e03\u5c40\uff0c\u8be6\u7ec6\u5b9e\u73b0\u53c2\u89c1\u8fd9\u7bc7\u6587\u7ae0\uff1a\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2017\/09\/css-shapes-outside-iphone-x-head\/\">\u501f\u52a9CSS Shapes\u5b9e\u73b0\u5143\u7d20\u6eda\u52a8\u73af\u7ed5iPhone X\u7684\u5218\u6d77<\/a>\u201d\u3002<\/p>\n<p>\u8fd9\u91cc\u4e0d\u8d58\u8ff0\u3002<\/p>\n<h3>\u516d\u3001\u7ed3\u8bed<\/h3>\n<p>\u81f3\u6b64\uff0cCSS3 \u51e0\u5927\u5e03\u5c40\u5168\u90e8\u4ecb\u7ecd\u5b8c\u6bd5\u4e86\uff0c\u5206\u522b\u662fFlex\u5e03\u5c40\uff0cGrid\u5e03\u5c40\uff0cColumns\u5e03\u5c40\uff0c\u4ee5\u53ca\u672c\u6587\u7684Shapes\u5e03\u5c40\uff0c\u81f3\u4e8eCSS Regions\u5e03\u5c40\uff0c\u770b\u8d8b\u52bf\uff0c\u6d4f\u89c8\u5668\u5e94\u8be5\u653e\u5f03\u652f\u6301\u4e86\uff0c\u56e0\u6b64\uff0c\u5ffd\u7565\uff0c\u4e0d\u505a\u4ecb\u7ecd\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2018\/10\/display-flex-css3-css\/\">\u5199\u7ed9\u81ea\u5df1\u770b\u7684display: flex\u5e03\u5c40\u6559\u7a0b<\/a><\/li>\n<li><a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2018\/11\/display-grid-css-css3\/\">\u5199\u7ed9\u81ea\u5df1\u770b\u7684display: grid\u5e03\u5c40\u6559\u7a0b<\/a><\/li>\n<li><a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2019\/01\/css-css3-columns-layout\/\">\u5199\u7ed9\u81ea\u5df1\u770b\u7684CSS columns\u5206\u680f\u5e03\u5c40\u6559\u7a0b<\/a><\/li>\n<\/ul>\n<p>\u672c\u6587\u867d\u7136\u6709\u4e9b\u7bc7\u5e45\uff0c\u4f46\u662f\u6bd4Grid\u5e03\u5c40\u5b66\u8d77\u6765\u8981\u8f7b\u677e\u591a\u4e86\u3002<\/p>\n<p>\u611f\u8c22\u9605\u8bfb\uff0c\u6b22\u8fce\u4ea4\u6d41\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/1f60f.svg\" width=\"20\" height=\"20\" align=\"absmiddle\"><\/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=8453\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=8453<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201902\/css-shapes-cover.png\" width=\"161\" height=\"111\" alt=\"CSS Shapes\u5e03\u5c40\" lazyload=\"on\" class=\"alignright size-medium\" \/><\/p>\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecdCSS Shapes\u5e03\u5c40\uff0c\u517c\u5bb9\u6027\u4e0d\u9519\uff0c\u79fb\u52a8\u7aef\u9879\u76ee\u548c\u4e2d\u540e\u53f0\u9879\u76ee\u90fd\u53ef\u4ee5\u4f7f\u7528\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5f88\u591a\u5f88\u68d2\u7684\u5e03\u5c40\u6548\u679c\uff0c\u9700\u8981\u548c\u6d6e\u52a8\u914d\u5408\u4f7f\u7528\u3002\u4e0d\u4ec5\u652f\u6301\u57fa\u7840\u56fe\u5f62\uff0c\u8fd8\u652f\u6301PNG\uff0cSVG\u56fe\u50cf\uff0c\u4ee5\u53ca\u6e10\u53d8\u56fe\u5f62\u7684\u73af\u7ed5\u6548\u679c\u3002\u662f\u975e\u5e38\u503c\u5f97\u5b66\u4e60\u7684\u4e00\u79cd\u5e03\u5c40\u65b9\u5f0f\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],"tags":[163,1168,177,1271,1078,1406,1407,1166,231,189],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/8453"}],"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=8453"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/8453\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=8453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=8453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=8453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}