{"id":3963,"date":"2024-11-10T09:38:06","date_gmt":"2024-11-10T01:38:06","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3963\/"},"modified":"2024-11-10T09:38:06","modified_gmt":"2024-11-10T01:38:06","slug":"%e5%a6%82%e4%bd%95%e7%94%a8-css-%e4%bb%a3%e7%a0%81%e6%89%93%e9%80%a0%e7%ae%80%e7%ba%a6%e7%bb%bf%e8%89%b2%e7%9a%84%e8%81%8a%e5%a4%a9%e6%b0%94%e6%b3%a1%ef%bc%8c%e5%b9%b6%e5%ae%9e%e7%8e%b0%e6%8c%87","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3963\/","title":{"rendered":"\u5982\u4f55\u7528 CSS \u4ee3\u7801\u6253\u9020\u7b80\u7ea6\u7eff\u8272\u7684\u804a\u5929\u6c14\u6ce1\uff0c\u5e76\u5b9e\u73b0\u6307\u5411\u4e0d\u540c\u4f4d\u7f6e\u7684\u4e09\u89d2\u7bad\u5934\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173120220582532.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7528 CSS \u4ee3\u7801\u6253\u9020\u7b80\u7ea6\u7eff\u8272\u7684\u804a\u5929\u6c14\u6ce1\uff0c\u5e76\u5b9e\u73b0\u6307\u5411\u4e0d\u540c\u4f4d\u7f6e\u7684\u4e09\u89d2\u7bad\u5934\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u7528 CSS \u4ee3\u7801\u6253\u9020\u7b80\u7ea6\u7eff\u8272\u7684\u804a\u5929\u6c14\u6ce1\uff0c\u5e76\u5b9e\u73b0\u6307\u5411\u4e0d\u540c\u4f4d\u7f6e\u7684\u4e09\u89d2\u7bad\u5934\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u6253\u9020\u7b80\u7ea6\u804a\u5929\u6c14\u6ce1\uff0c\u8f7b\u677e\u5b9e\u73b0\u4e09\u89d2\u7bad\u5934<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong><\/p>\n<p>\u7ecf\u5178\u7684\u804a\u5929\u6c14\u6ce1\u72b6\uff0c\u5982\u4f55\u4f7f\u7528 css \u7ed8\u5236\u51fa\u7eff\u8272\u7684\u6c14\u6ce1\u548c\u6307\u5411\u7279\u5b9a\u4f4d\u7f6e\u7684\u4e09\u89d2\u7bad\u5934\u5462\uff1f<\/p>\n<p><strong>\u5b9e\u73b0\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u4f7f\u7528\u63d0\u524d\u9884\u8bbe\u7684 4 \u4e2a\u4f4d\u7f6e\uff0c\u518d\u901a\u8fc7\u5339\u914d\u5373\u53ef\u3002\u4ee5\u9ed8\u8ba4\u5c45\u53f3\u4e3a\u4f8b\uff1a<\/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<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=\"right\"]:before {\n  right: 0;\n  top: 50%;\n  transform: translate(50%, -50%) rotate(45deg);\n}\n\ndiv[position=\"left\"]:before {\n  top: 50%;\n  left: 0;\n  transform: translate(-50%, -50%) rotate(45deg);\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528 CSS \u4ee3\u7801\u6253\u9020\u7b80\u7ea6\u7eff\u8272\u7684\u804a\u5929\u6c14\u6ce1\uff0c\u5e76\u5b9e\u73b0\u6307\u5411\u4e0d\u540c\u4f4d\u7f6e\u7684\u4e09\u89d2\u7bad\u5934\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>\u6253\u9020\u7b80\u7ea6\u804a\u5929\u6c14\u6ce1\uff0c\u8f7b\u677e\u5b9e\u73b0\u4e09\u89d2\u7bad\u5934 \u95ee\u9898\uff1a \u7ecf\u5178\u7684\u804a\u5929\u6c14\u6ce1\u72b6\uff0c\u5982\u4f55\u4f7f\u7528 css \u7ed8\u5236\u51fa\u7eff\u8272\u7684\u6c14\u6ce1\u548c\u6307\u5411\u7279\u5b9a\u4f4d\u7f6e\u7684\u4e09\u89d2\u7bad\u5934\u5462\uff1f \u5b9e\u73b0\u65b9\u6cd5\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u4f7f\u7528\u63d0\u524d\u9884\u8bbe\u7684 4 \u4e2a\u4f4d\u7f6e\uff0c\u518d\u901a\u8fc7\u5339\u914d\u5373\u53ef\u3002\u4ee5\u9ed8\u8ba4\u5c45\u53f3\u4e3a\u4f8b\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 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: [&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-3963","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3963","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=3963"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3963\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}