{"id":1432,"date":"2024-11-10T08:53:31","date_gmt":"2024-11-10T00:53:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1432\/"},"modified":"2024-11-10T08:53:31","modified_gmt":"2024-11-10T00:53:31","slug":"%e5%a6%82%e4%bd%95%e7%94%a8-css-%e5%ae%9e%e7%8e%b0%e5%b1%82%e5%8f%a0%e4%bc%98%e6%83%a0%e5%88%b8%e6%95%88%e6%9e%9c%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1432\/","title":{"rendered":"\u5982\u4f55\u7528 CSS \u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173043255064246.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7528 CSS \u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u7528 CSS \u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong> \u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c<\/strong><\/p>\n<p>\u5728 css \u4e2d\u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c\u5e76\u4e0d\u56f0\u96be\u3002\u4e4b\u524d\uff0c@xboxyan \u5728\u300acss \u5b9e\u73b0\u4f18\u60e0\u5238\u7684\u6280\u5de7\u300b\u4e00\u6587\u4e2d\u5206\u4eab\u4e86\u76f8\u5173\u7684\u5b9e\u73b0\u65b9\u6cd5\u3002<\/p>\n<p><strong>\u6548\u679c\u9884\u89c8<\/strong><\/p>\n<p>[\u56fe\u7247\uff1a\u4f18\u60e0\u5238\u6548\u679c\u9884\u89c8]<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u5b9e\u73b0\u6b65\u9aa4<\/strong><\/p>\n<p><strong>html \u7ed3\u6784<\/strong><\/p>\n<pre>&lt;div class=\"coupon\"&gt;\n  &lt;p&gt;10% off&lt;\/p&gt;\n  &lt;p&gt;coupon code: abc123&lt;\/p&gt;\n&lt;\/div&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>css \u6837\u5f0f<\/strong><\/p>\n<pre>.coupon {\n  position: relative;\n  padding: 10px;\n  background-color: #f39c12;\n  color: #fff;\n}\n\n.coupon::before,\n.coupon::after {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 50%;\n  height: 100%;\n  background: linear-gradient(135deg, #f39c12 25%, #fff 75%);\n}\n\n.coupon::before {\n  transform: skewY(-20deg);\n}\n\n.coupon::after {\n  left: 50%;\n  transform: skewY(20deg);\n}\n\n\/\/ \u4f18\u60e0\u5238\u6587\u672c\u6837\u5f0f\n.coupon p {\n  margin: 0;\n  text-align: center;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u901a\u8fc7\u4f7f\u7528\u5728\u4f18\u60e0\u5238\u5143\u7d20\u4e0a\u53e0\u52a0\u4f2a\u5143\u7d20\uff0c\u5e76\u7ed3\u5408\u7ebf\u6027\u6e10\u53d8\u80cc\u666f\u548c\u659c\u5207\u53d8\u6362\uff0c\u5373\u53ef\u5b9e\u73b0\u4f18\u60e0\u5238\u7684\u5c42\u53e0\u6548\u679c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528 CSS \u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c\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>\u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c \u5728 css \u4e2d\u5b9e\u73b0\u5c42\u53e0\u4f18\u60e0\u5238\u6548\u679c\u5e76\u4e0d\u56f0\u96be\u3002\u4e4b\u524d\uff0c@xboxyan \u5728\u300acss \u5b9e\u73b0\u4f18\u60e0\u5238\u7684\u6280\u5de7\u300b\u4e00\u6587\u4e2d\u5206\u4eab\u4e86\u76f8\u5173\u7684\u5b9e\u73b0\u65b9\u6cd5\u3002 \u6548\u679c\u9884\u89c8 [\u56fe\u7247\uff1a\u4f18\u60e0\u5238\u6548\u679c\u9884\u89c8] \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5b9e\u73b0\u6b65\u9aa4 html \u7ed3\u6784 &lt;div class=&#8221;coupon&#8221;&gt; &lt;p&gt;10% off&lt;\/p&gt; &lt;p&gt;coupon code: abc123&lt;\/p&gt; &lt;\/div&gt; \u767b\u5f55\u540e\u590d\u5236 css \u6837\u5f0f .coupon { position: relative; padding: 10px; background-color: #f39c12; color: #fff; } .coupon::before, .coupon::after { content: &#8220;&#8221;; position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: linear-gradient(135deg, #f39c12 25%, #fff 75%); [&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-1432","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1432","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=1432"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1432\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}