{"id":27522,"date":"2024-11-24T09:23:13","date_gmt":"2024-11-24T01:23:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27522\/"},"modified":"2024-11-24T09:23:13","modified_gmt":"2024-11-24T01:23:13","slug":"%e5%a6%82%e4%bd%95%e7%94%a8-css-%e5%88%b6%e4%bd%9c%e5%b7%a6%e4%be%a7%e7%bb%bf%e8%89%b2%e4%b8%89%e8%a7%92%e5%bd%a2%e7%9a%84%e6%b0%94%e6%b3%a1%e6%a0%b7%e5%bc%8f%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27522\/","title":{"rendered":"\u5982\u4f55\u7528 CSS \u5236\u4f5c\u5de6\u4fa7\u7eff\u8272\u4e09\u89d2\u5f62\u7684\u6c14\u6ce1\u6837\u5f0f\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173128518540907.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7528 CSS \u5236\u4f5c\u5de6\u4fa7\u7eff\u8272\u4e09\u89d2\u5f62\u7684\u6c14\u6ce1\u6837\u5f0f\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u7528 CSS \u5236\u4f5c\u5de6\u4fa7\u7eff\u8272\u4e09\u89d2\u5f62\u7684\u6c14\u6ce1\u6837\u5f0f\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5236\u4f5c  \u7b80\u5355\u804a\u5929\u6c14\u6ce1<\/strong><\/p>\n<p>\u8981\u5b9e\u73b0\u5de6\u4fa7\u7eff\u6c14\u6ce1\u6837\u5f0f\u7684\u4e09\u89d2\u5f62\uff0c\u6211\u4eec\u53ef\u4ee5\u9884\u5148\u5b9a\u4e49\u56db\u4e2a\u4f4d\u7f6e\uff1a\u5de6\u3001\u4e0a\u3001\u4e0b\u3001\u53f3\uff0c\u5e76\u4f7f\u7528\u8fdb\u884c\u5339\u914d\u3002\u4e0b\u9762\u4ecb\u7ecd\u4e00\u79cd\u9ed8\u8ba4\u5c45\u53f3\u7684\u5b9e\u73b0\u65b9\u6cd5\uff1a<\/p>\n<p><strong>html \u4ee3\u7801\uff1a<\/strong><\/p>\n<pre>&lt;div&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt;\n&lt;div position=\"left\"&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt;\n&lt;div position=\"top\"&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt;\n&lt;div position=\"bottom\"&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt;\n&lt;div position=\"right\"&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>css \u4ee3\u7801\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<pre>div {\n  min-width: 100px;\n  min-height: 30px;\n  line-height: 30px;\n  background: #93ec69;\n  padding: 0 10px;\n  border-radius: 4px;\n  margin: 10px;\n  display: inline-block;\n  position: relative;\n}\n\ndiv:before {\n  content: '';\n  width: 8px;\n  height: 8px;\n  background: #93ec69;\n  display: block;\n  position: absolute;\n  right: 0;\n  top: 50%;\n  transform: translate(50%, -50%) rotate(45deg);\n}\n\ndiv[position=\"top\"]:before {\n  top: 0;\n  left: 50%;\n  transform: translate(-50%, -50%) rotate(45deg);\n}\n\ndiv[position=\"bottom\"]:before {\n  top: 100%;\n  left: 50%;\n  transform: translate(-50%, -50%) rotate(45deg);\n}\n\ndiv[position=\"left\"]:before {\n  left: 0;\n  top: 50%;\n  transform: translate(-50%, -50%) rotate(45deg);\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u5904\u7684\u53d8\u6362\u5c5e\u6027 transform: translate(50%, -50%) rotate(45deg)\uff0c\u4f7f\u5176\u80fd\u591f\u6839\u636e\u4e0d\u540c\u4f4d\u7f6e\u8c03\u6574\u4e09\u89d2\u5f62\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528 CSS \u5236\u4f5c\u5de6\u4fa7\u7eff\u8272\u4e09\u89d2\u5f62\u7684\u6c14\u6ce1\u6837\u5f0f\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>\u5982\u4f55\u5236\u4f5c \u7b80\u5355\u804a\u5929\u6c14\u6ce1 \u8981\u5b9e\u73b0\u5de6\u4fa7\u7eff\u6c14\u6ce1\u6837\u5f0f\u7684\u4e09\u89d2\u5f62\uff0c\u6211\u4eec\u53ef\u4ee5\u9884\u5148\u5b9a\u4e49\u56db\u4e2a\u4f4d\u7f6e\uff1a\u5de6\u3001\u4e0a\u3001\u4e0b\u3001\u53f3\uff0c\u5e76\u4f7f\u7528\u8fdb\u884c\u5339\u914d\u3002\u4e0b\u9762\u4ecb\u7ecd\u4e00\u79cd\u9ed8\u8ba4\u5c45\u53f3\u7684\u5b9e\u73b0\u65b9\u6cd5\uff1a html \u4ee3\u7801\uff1a &lt;div&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt; &lt;div position=&#8221;left&#8221;&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt; &lt;div position=&#8221;top&#8221;&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt; &lt;div position=&#8221;bottom&#8221;&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt; &lt;div position=&#8221;right&#8221;&gt;\u8fd9\u91cc\u662f\u6587\u5b57\u5185\u5bb9&lt;\/div&gt; \u767b\u5f55\u540e\u590d\u5236 css \u4ee3\u7801\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b div { min-width: 100px; min-height: 30px; line-height: 30px; background: #93ec69; padding: 0 10px; border-radius: 4px; margin: 10px; display: inline-block; position: relative; } div:before { content: &#8221;; width: 8px; height: 8px; background: #93ec69; display: block; position: absolute; right: [&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-27522","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27522","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=27522"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27522\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}