{"id":9352,"date":"2020-04-09T00:40:13","date_gmt":"2020-04-08T16:40:13","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9352"},"modified":"2020-04-09T00:43:22","modified_gmt":"2020-04-08T16:43:22","slug":"css-text-layout-circle","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2020\/04\/css-text-layout-circle\/","title":{"rendered":"CSS\u6280\u672f\u5206\u4eab: \u6587\u5b57\u5728\u5706\u5f62\u5185\u6cbf\u7740\u5f27\u7ebf\u8fb9\u754c\u6392\u7248"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9352\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=9352<\/a><br \/>\n\u672c\u6587\u6b22\u8fce\u5206\u4eab\u4e0e\u805a\u5408\uff0c\u5168\u6587\u8f6c\u8f7d\u5c31\u4e0d\u5fc5\u4e86\uff0c\u5c0a\u91cd\u7248\u6743\uff0c\u5708\u5b50\u5c31\u8fd9\u4e48\u5927\uff0c\u82e5\u6025\u7528\u53ef\u4ee5\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/202004-around-circle.jpg';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202004\/cover-circle.jpg\" width=\"377\" height=\"265\" alt=\"\u6587\u5b57\u73af\u5f62\u6392\u7248\u5360\u4f4d\u56fe\" class=\"alignright clip size-medium\" \/><\/p>\n<h3>\u4e00\u3001\u5706\u5f62\u533a\u57df\u6587\u5b57\u6392\u7248\u95ee\u9898<\/h3>\n<p>\u5982\u679c\u5bb9\u5668\u662f\u6b63\u65b9\u5f62\uff0c\u5219\u6587\u5b57\u6392\u7248\u5f88Easy\uff0c\u83dc\u5e02\u573a\u7684\u8001\u592a\u592a\u4e5f\u80fd\u5b9e\u73b0\uff0c\u56e0\u4e3a\u5929\u70ed\u6392\u7248\u5c31\u662fOK\u7684\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>p {\r\n  padding: 10px;\r\n  width: 12em;\r\n  background: deepskyblue;\r\n  color: #fff;\r\n}<\/pre>\n<p>\u5b9e\u65f6\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n<p style=\"padding:10px;width: 12em; background: deepskyblue; color: #fff;\">\u5982\u679c\u4f60\u5728\u5176\u4ed6\u5730\u65b9\u770b\u5230zxx\u6216\u8005zhang<wbr>xin<wbr>xu\u6587\u5b57\u7684\u5185\u5bb9\uff0c\u8bf4\u660e\u662f\u76d7\u7248\u7684\u6211\u7684\u6587\u7ae0\uff0c\u6b22\u8fce\u53cd\u9988<\/p>\n<p>\u4f46\u662f\uff0c\u5982\u679c\u6211\u4eec\u8bbe\u7f6e\u4e86\u5de8\u5927\u7684\u5706\u89d2\uff0c\u5219\u6587\u5b57\u6392\u7248\u6548\u679c\u5c31\u6709\u4e9b\u60e8\u4e0d\u5fcd\u7779\u4e86\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>p {\r\n  padding: 10px;\r\n  width: 12em;\r\n  background: deepskyblue;\r\n  color: #fff;\r\n  border-radius: 50%;\r\n}<\/pre>\n<p>\u5b9e\u65f6\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n<p style=\"padding:10px;width: 12em; background: deepskyblue; color: #fff;border-radius: 50%;\">\u5982\u679c\u4f60\u5728\u5176\u4ed6\u5730\u65b9\u770b\u5230zxx\u6216\u8005zhang<wbr>xin<wbr>xu\u6587\u5b57\u7684\u5185\u5bb9\uff0c\u8bf4\u660e\u662f\u76d7\u7248\u7684\u6211\u7684\u6587\u7ae0\uff0c\u6b22\u8fce\u53cd\u9988<\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u90e8\u5206\u6587\u5b57\u76f4\u63a5\u90fd\u770b\u4e0d\u89c1\u4e86\uff0c\u4e0a\u4e0b\u5de6\u53f3\u7559\u4e0b\u7684\u95f4\u9699\u4e5f\u4e0d\u4e00\u81f4\uff0c\u770b\u8d77\u6765\u597d\u96be\u53d7\u3002<\/p>\n<p>\u6b64\u65f6\uff0c\u6c34\u8c37\u96eb\u6258\u7740\u4e0b\u5df4\uff0c\u5bf9\u7740\u7a97\u5916\u611f\u53f9\u9053\uff1a\u201c\u8981\u662f\u6587\u5b57\u53ef\u4ee5\u6cbf\u7740\u5706\u5f27\u7684\u8fb9\u754c\u6392\u7248\u5c31\u597d\u4e86\u3002\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202004\/2020-04-07_161649.jpg\" width=\"200\" height=\"118\" alt=\"\u6c34\u8c37\u96eb \u7a97\u5916\"><\/p>\n<p>\u5409\u7530\u6625\u6ee1\u8138\u6ce1\u6ce1\u8336\u58f6\u5730\u56de\u9053\uff1a\u201c\u6211\u6709\u529e\u6cd5\u5b9e\u73b0\u7684\u5462~\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202004\/2020-04-07_162406.jpg\" width=\"200\" height=\"116\" alt=\"\u5409\u7530\u6625 \u56de\u89c6\"><\/p>\n<h3>\u4e8c\u3001CSS Shapes\u5e03\u5c40\u4e0e\u73af\u5f62\u6392\u7248<\/h3>\n<p>\u5982\u679c\u5bf9CSS Shapes\u5e03\u5c40\u8fd8\u4e0d\u592a\u4e86\u89e3\uff0c\u53ef\u4ee5\u53c2\u9605\u6211\u4e4b\u524d\u8fd9\u7bc7\u70ed\u6587\uff1a\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2019\/02\/css-css3-shapes\/\">\u5199\u7ed9\u81ea\u5df1\u770b\u7684CSS shapes\u5e03\u5c40\u6559\u7a0b<\/a>\u201d\u3002<\/p>\n<p>\u5176\u4e2d\uff0cCSS Shapes\u5e03\u5c40\u53ef\u4ee5\u56f4\u7ed5\u56fe\u7247\u5e03\u5c40\uff08\u6839\u636eAlpha\u901a\u9053\u900f\u660e\u5ea6\uff09\uff0c\u8fd9\u4e2a\u56fe\u7247\u5305\u62ec\u6e10\u53d8\uff0c\u4e8e\u662f\u4e4e\uff0c\u6211\u4eec\u53ea\u9700\u8981\u7ed8\u5236\u4e24\u4e2a\u5185\u51f9\u7684\u5706\u5f27\u5f84\u5411\u6e10\u53d8\uff0c\u7136\u540e\u8ba9\u6587\u5b57\u73af\u7ed5\u5e03\u5c40\u4e0d\u5c31\u597d\u4e86\u3002<\/p>\n<p>\u8bf4\u5e72\u5c31\u5e72\uff0c\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u73b0\u5728\u6587\u5b57\u524d\u9762\u63d2\u5165\u4e24\u4e2a\u5143\u7d20\uff0c\u4e00\u4e2a\u5de6\u6d6e\u52a8\uff0c\u4e00\u4e2a\u53f3\u6d6e\u52a8\uff0c\u7136\u540e\u7ed8\u5236\u5185\u51f9\u7684\u5f84\u5411\u6e10\u53d8\u3002<\/p>\n<p>HTML\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;p class=\"circle\"&gt;\r\n    &lt;before&gt;&lt;\/before&gt;&lt;after&gt;&lt;\/after&gt;\r\n    ...\u6587\u5b57\u5185\u5bb9\r\n&lt;\/p&gt;<\/pre>\n<p>CSS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>.circle {\r\n    border-radius: 50%;\r\n    width: 207px; height: 250px;\r\n    color: white;\r\n    background-color: deepskyblue;\r\n    padding: 10px;\r\n}\r\nbefore {\r\n    float: left;\r\n    width: 50%; height: 100%;\r\n    shape-outside: radial-gradient(farthest-side ellipse at right, transparent 100%, red);\r\n}\r\nafter {\r\n    float: right;\r\n    width: 50%; height: 100%;\r\n    shape-outside: radial-gradient(farthest-side ellipse at left, transparent 100%, red);\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\/202004\/2020-04-08_003218.png\" width=\"400\" height=\"381\" alt=\"\u56f4\u7ed5\u5706\u73af\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202004\/text-around-circle-css-shapes-demo.php\" rel=\"noopener\" target=\"_blank\">CSS Shapes\u5e03\u5c40\u8ba9\u6587\u5b57\u5728\u5706\u73af\u5185\u6392\u7248demo<\/a><\/p>\n<p>\u539f\u7406\u5c31\u662f\u6784\u5efa\u4e24\u4e2a\u5f27\u5f62\uff0c\u7136\u540e\u4f7f\u7528CSS Shapes\u5e03\u5c40\u8ba9\u6587\u5b57\u6cbf\u7740\u8fd9\u4e2a\u5f27\u5f62\u6392\u5217\u5373\u53ef\u3002<\/p>\n<h4>\u4e0d\u8981\u9ad8\u5174\u5730\u592a\u65e9<\/h4>\n<p>\u7136\u540e\u4e0a\u9762\u7684\u5b9e\u73b0\u4ecd\u7136\u6709\u4e00\u4e9b\u5c40\u9650\u3002<\/p>\n<p>\u9996\u5148\u5bb9\u5668\u9700\u8981\u5b9a\u9ad8\uff0c\u4e0d\u7136\u5de6\u53f3\u6d6e\u52a8\u7684\u5143\u7d20\u9ad8\u5ea6\u4e0d\u4f1a\u5b58\u5728\uff0c\u6216\u8005<code>&lt;before&gt;<\/code>\u548c<code>&lt;after&gt;<\/code>\u5143\u7d20\u8bbe\u7f6e\u5177\u4f53\u7684\u957f\u5ea6\u503c\u624d\u53ef\u4ee5\uff08\u8fd9\u6837\u4e0d\u4e00\u5b9a\u53ef\u4ee5\u6b63\u597d\u548c\u5f62\u72b6\u5339\u914d\uff09\u3002<\/p>\n<p>\u5176\u6b21\u9700\u8981\u5728\u6587\u5b57\u524d\u9762\u63d2\u5165<code>&lt;before&gt;<\/code>\u548c<code>&lt;after&gt;<\/code>\u8fd9\u4e24\u4e2a\u5143\u7d20\u5b9e\u5728\u662f\u592a\u4e0d\u65b9\u4fbf\u4e86\uff0c\u6bcf\u6b21\u90fd\u63d2\u5165\u4e24\u4e2a\u5143\u7d20\uff0c\u53c8\u5570\u55e6\u53c8\u4e0d\u597d\u7ef4\u62a4\u3002\u600e\u4e48\u529e\uff0c\u6709\u6ca1\u6709\u4ec0\u4e48\u4f18\u5316\u7684\u65b9\u6cd5\u5462\uff1f<\/p>\n<p>\u8bd5\u8bd5\u770b\u4f7f\u7528\u81ea\u5b9a\u4e49\u5143\u7d20\u3002<\/p>\n<h3>\u4e09\u3001\u4f7f\u7528\u81ea\u5b9a\u4e49\u5143\u7d20\u4f18\u5316\u73af\u5f62\u6392\u7248<\/h3>\n<p>\u81ea\u5b9a\u4e49\u4e00\u4e2a\u540d\u4e3a<code>&lt;zxx-circle&gt;<\/code>\u7684\u5143\u7d20\uff0c\u4f7f\u7528Shadow DOM\u628a<code>&lt;before&gt;<\/code>\u548c<code>&lt;after&gt;<\/code>\u5143\u7d20\u85cf\u5728\u81ea\u5b9a\u4e49\u5143\u7d20\u91cc\u9762\uff0c\u8fd9\u6837\uff0cHTML\u4ee3\u7801\u5c31\u4f1a\u5f88\u5e72\u51c0\u4e86\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;zxx-circle&gt;\u5728CSS ... by zhangxinxu&lt;\/zxx-circle&gt;<\/pre>\n<p>\u5c31\u4f1a\u6709\u5982\u4e0b\u56fe\u6240\u793a\u7684\u6548\u679c\u4e86\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202004\/2020-04-08_003218.png\" width=\"400\" height=\"381\" alt=\"\u56f4\u7ed5\u5706\u73af\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u540c\u65f6\uff0c\u5982\u679c\u5143\u7d20\u4e0d\u8bbe\u7f6e\u9ad8\u5ea6\uff0c\u4e5f\u80fd\u6709\u6548\u679c\uff0c\u4f46\u662f\uff0c\u6700\u7ec8\u7684\u9ad8\u5ea6\u4e0d\u4e00\u5b9a\u7cbe\u51c6\uff0c\u6211\u662f\u7c97\u7565\u5b9e\u73b0\u4e86\u4e0b\uff0c\u56e0\u6b64\uff0c\u5b9e\u9645\u5f00\u53d1\uff0c\u5982\u679c\u53ef\u4ee5\uff0c\u5efa\u8bae\u5f00\u59cb\u8bbe\u5b9a\u597d\u9ad8\u5ea6\uff0c\u4f53\u9a8c\u66f4\u597d\u3002<\/p>\n<p>JS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>class HTMLZxxCircleElement extends HTMLElement {\r\n  constructor() {\r\n    self = super();\r\n\r\n    let shadow = this.attachShadow({\r\n        mode: 'open'\r\n    });\r\n    \r\n    <span style=\"color:green;\">\/\/ \u6587\u672c\u5185\u5bb9\u79fb\u52a8\u5230shadow dom\u5143\u7d20\u4e2d<\/span>\r\n    let style = document.createElement('style');\r\n    shadow.appendChild(style);\r\n    <span style=\"color:green;\">\/\/ \u524d\u540e\u5143\u7d20<\/span>\r\n    let before = document.createElement('zxx-before');\r\n    let after = document.createElement('zxx-after');\r\n    shadow.prepend(after);\r\n    shadow.prepend(before);\r\n    <span style=\"color:green;\">\/\/ \u5185\u5bb9<\/span>\r\n    let content = document.createElement('div');\r\n    shadow.appendChild(content);\r\n\r\n    let ro = new ResizeObserver( entries =&gt; {\r\n      for (let entry of entries) {\r\n        self._updateRendering();\r\n      }\r\n    });\r\n    \r\n    <span style=\"color:green;\">\/\/ \u89c2\u5bdf\u5f53\u524d\u5143\u7d20\u5c3a\u5bf8\u53d8\u5316<\/span>\r\n    ro.observe(this);\r\n  }\r\n  \r\n  connectedCallback() {\r\n    <span style=\"color:green;\">\/\/ \u6267\u884c\u6e32\u67d3\u66f4\u65b0<\/span>\r\n    this._updateRendering();\r\n  }\r\n  _updateRendering() {\r\n    let shadow = this.shadowRoot;\r\n    let content = shadow.querySelector('div');\r\n    let before = shadow.querySelector('zxx-before');\r\n    before.style.height = 'auto';\r\n    <span style=\"color:green;\">\/\/ \u5185\u5bb9\u66f4\u65b0<\/span>\r\n    content.innerHTML = this.innerHTML;\r\n    <span style=\"color:green;\">\/\/ \u6b64\u65f6\u5185\u5bb9\u9ad8\u5ea6<\/span>\r\n    let heightContent = parseFloat(getComputedStyle(content).height);\r\n    let heightBefore = parseFloat(getComputedStyle(before).height);\r\n    \r\n    if (heightContent == 0) {\r\n        return;\r\n    }\r\n    \r\n    <span style=\"color:green;\">\/\/ \u6ca1\u6709\u8bbe\u7f6e\u5177\u4f53\u7684\u9ad8\u5ea6\u503c<\/span>\r\n    if (heightBefore == 0 &amp;&amp; heightContent != 0) {\r\n        <span style=\"color:green;\">\/\/ \u540c\u6837\u9762\u79ef\u7684\u692d\u5706\u7684\u9ad8\u5ea6\u662f\uff1f<\/span>\r\n        <span style=\"color:green;\">\/\/ s = \u03c0\u00d7a\u00d7b<\/span>\r\n        let height = (2 *  heightContent * 2 \/ Math.PI) + 'px';\r\n        \r\n        console.warn('&lt;zxx-circle&gt; no height, set it to ' + height + '!');\r\n        this.style.height = height;\r\n    }\r\n    before.removeAttribute('style');\r\n    <span style=\"color:green;\">\/\/ \u6837\u5f0f\u8bbe\u7f6e<\/span>\r\n    shadow.querySelector('style').textContent = `:host {\r\n    border-radius: 50%;\r\n}\r\nzxx-before,\r\nzxx-after {\r\n    width: 50%; min-height: 100%; height: ${heightContent}px;\r\n}\r\nzxx-before {\r\n    float: left;\r\n    shape-outside: radial-gradient(farthest-side ellipse at right, transparent 100%, red);\r\n}\r\nzxx-after {\r\n    float: right;\r\n    shape-outside: radial-gradient(farthest-side ellipse at left, transparent 100%, red);\r\n}`;\r\n  }\r\n}\r\n<span style=\"color:green;\">\/\/ \u5b9a\u4e49zxx-circle\u6807\u7b7e\u5143\u7d20<\/span>\r\ncustomElements.define('zxx-circle', HTMLZxxCircleElement);<\/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\/202004\/text-around-circle-custom-element-demo.php\" rel=\"noopener\" target=\"_blank\">\u81ea\u5b9a\u4e49\u5143\u7d20\u4f18\u5316\u6587\u5b57\u5728\u5706\u73af\u5185\u6392\u7248demo<\/a><\/p>\n<p>\u5982\u679c\u9ad8\u5ea6\u662fauto\uff0c\u5219\u6548\u679c\u662f\u4e0b\u56fe\u8fd9\u6837\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202004\/2020-04-09_001434.png\" width=\"349\" height=\"372\" alt=\"\u9ad8\u5ea6auto\u65f6\u5019\u7684\u5e03\u5c40\u6548\u679c\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u56db\u3001\u5176\u4ed6\u4e00\u4e9b\u8bf4\u660e<\/h3>\n<p>Chrome\u6d4f\u89c8\u5668\u4e0b\uff0c\u8fd9\u4e2a\u5de6\u53f3\u6d6e\u52a8\u7684CSS Shapes\u5e03\u5c40\u6709\u4e2a\u548c\u641e\u7b11\u7684\u5947\u5076bug\uff0c\u5176\u5b9e\u4e0a\u9762\u8fd9\u4e2a\u56fe\u5c31\u6709\u8fd9\u4e2a\u95ee\u9898\u4e86\uff0c\u4e2d\u95f4\u7684\u6587\u5b57\u83ab\u540d\u53ea\u663e\u793a\u4e86\u5de6\u8fb950%\uff0c\u53f3\u8fb950%\u6ca1\u663e\u793a\u3002<\/p>\n<p>\u6211\u770b\u53ef\u4ee5\u770b\u4e0b\u4e0b\u9762\u8fd9\u4e2aGIF\u5f55\u5c4f\u793a\u610f\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202004\/shape-bug.gif\" width=\"662\" height=\"324\" alt=\"Shapes\u5e03\u5c40\u5947\u5076bug\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u548c\u82f1\u6587\u5355\u8bcd\u6216\u8005\u6362\u884c\u4ec0\u4e48\u7684\u90fd\u6ca1\u6709\u4efb\u4f55\u5173\u7cfb\uff0c\u5168\u90e8\u90fd\u662f\u4e2d\u6587\u4e5f\u662f\u8fd9\u6837\uff0c\u5927\u5bb6\u6709\u5174\u8da3\u53ef\u4ee5\u53bbdemo\u9875\u9762\u81ea\u5df1\u611f\u53d7\u4e0b\u3002<\/p>\n<p>\u6293\u7d27\u673a\u4f1a\uff0c\u6015\u662f\u8fc7\u5341\u51e0\u4e2a\u7248\u672c\u8fd9\u4e2a\u95ee\u9898\u5c31\u4f1a\u88ab\u4fee\u590d\u4e86\u3002Firefox\u6d4f\u89c8\u5668\u6ca1\u6709\u4efb\u4f55\u95ee\u9898\uff0c\u8868\u73b0\u5b8c\u5168OK\u3002<\/p>\n<p><code>&lt;zxx-circle&gt;<\/code>\u81ea\u5b9a\u4e49\u5143\u7d20\u7684\u5b9e\u73b0\u5c31\u662f\u521a\u521a\u4e2a\u628a\u5c0f\u65f6\u6298\u817e\u4e86\u4e0b\uff0c\u60f3\u8981\u5b8c\u5168\u7cbe\u51c6\u8ba1\u7b97\u6700\u4f73\u9ad8\u5ea6\uff0c\u6709\u4e9b\u8d85\u51fa\u81ea\u5df1\u7684\u80fd\u529b\u8303\u56f4\u4e86\uff0c\u53ea\u80fd\u5927\u81f4\u5904\u7406\u4e0b\uff0c\u6b22\u8fce\u6709\u5174\u8da3\u7684\u4eba\u8fdb\u884c\u4f18\u5316\u4e0b\u3002\u5f53\u5143\u7d20\u9ad8\u5ea6auto\u7684\u65f6\u5019\uff0c\u7cbe\u51c6\u8ba1\u7b97\u5de6\u53f3Shapes\u56fe\u5f62\u7684\u9ad8\u5ea6\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u5c31\u8bf4\u8fd9\u4e48\u591a\u3002<\/p>\n<p>CSS Shapes\u5e03\u5c40 IE\u6d4f\u89c8\u5668\uff0cEdge\u6d4f\u89c8\u5668\u90fd\u4e0d\u652f\u6301\uff0c\u76ee\u524d\u9002\u5408\u4e2d\u540e\u53f0\u9879\u76ee\uff0c\u6216\u8005\u79fb\u52a8\u7aef\u4ea7\u54c1\uff08\u8001\u624b\u673a\u4e0d\u652f\u6301\u7684\u9879\u76ee\uff09 \u3002<\/p>\n<p>\u975e\u5178\u578b\u573a\u666f\uff0c\u4f46\u662f\uff0c\u4e07\u4e00\u54ea\u4e2a\u5c0f\u4f19\u4f34\u9047\u5230\u8fd9\u6837\u7684\u9700\u6c42\uff0c\u8bf4\u4e0d\u5b9a\u5c31\u5e2e\u4e86\u5927\u5fd9\u3002<\/p>\n<p>\u4ee5\u4e0a\uff0c\u611f\u8c22\u9605\u8bfb\uff0c\u6b22\u8fce\u5206\u4eab\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/1f618.svg\" width=\"20\" height=\"20\" align=\"absmiddle\"><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u6b22\u8fce\u5206\u4eab\uff0c\u52ff\u5168\u6587\u8f6c\u8f7d\uff0c\u5982\u679c\u5b9e\u5728\u559c\u6b22\uff0c\u53ef\u6536\u85cf\uff0c\u6c38\u4e0d\u8fc7\u671f\uff0c\u4e14\u4f1a\u53ca\u65f6\u66f4\u65b0\u77e5\u8bc6\u70b9\u53ca\u4fee\u6b63\u9519\u8bef\uff0c\u9605\u8bfb\u4f53\u9a8c\u4e5f\u66f4\u597d\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9352\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=9352<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"alignright\" style=\"float:right;margin-left:10px;\"><strong style=\"position:absolute;color: #4e8700;text-shadow:-1px -1px #fff;font-size:20px;margin:40px 0 0 30px;z-index:1;\">Text around<\/strong><img decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/202004\/cover-circle.jpg\" width=\"160\" height=\"112\" alt=\"\u6587\u5b57\u73af\u5f62\u6392\u7248\u5360\u4f4d\u56fe\" class=\"size-medium\" loading=\"lazy\" \/><\/div>\n<p>\u6709\u4e00\u4e2a\u6b63\u5706\u6216\u8005\u692d\u5706\uff0c\u91cc\u9762\u6709\u4e00\u4e9b\u6587\u5b57\uff0c\u5982\u4f55\u8ba9\u8fd9\u4e9b\u6587\u5b57\u6bcf\u4e00\u884c\u7684\u8fb9\u7f18\u6b63\u597d\u5c31\u662f\u5706\u5f27\u7684\u8fb9\u7f18\u800c\u4e0d\u53d1\u751f\u6ea2\u51fa\u5462\uff1f\u672c\u6587\u5c31\u5c06\u4ecb\u7ecd\u8fd9\u4e2aCSS\u5e03\u5c40\u6280\u5de7\uff0c\u5e0c\u671b\u53ef\u4ee5\u5e2e\u5230\u5927\u5bb6\u7684\u5b66\u4e60\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":[339,1168,1271,1589,1181,828,1516,1590,1223],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/9352"}],"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=9352"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/9352\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=9352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=9352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=9352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}