{"id":28176,"date":"2024-11-24T14:48:01","date_gmt":"2024-11-24T06:48:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/28176\/"},"modified":"2024-11-24T14:48:01","modified_gmt":"2024-11-24T06:48:01","slug":"%e5%a6%82%e4%bd%95%e7%94%a8-html-%e5%92%8c-css-%e5%ae%9e%e7%8e%b0%e5%9b%be%e7%89%87%e6%9b%b2%e7%ba%bf%e6%8b%89%e4%bc%b8%e6%8e%92%e5%88%97%e5%b8%83%e5%b1%80%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/28176\/","title":{"rendered":"\u5982\u4f55\u7528 HTML \u548c CSS \u5b9e\u73b0\u56fe\u7247\u66f2\u7ebf\u62c9\u4f38\u6392\u5217\u5e03\u5c40\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173142018345296.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u7528 HTML \u548c CSS \u5b9e\u73b0\u56fe\u7247\u66f2\u7ebf\u62c9\u4f38\u6392\u5217\u5e03\u5c40\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u7528 HTML \u548c CSS \u5b9e\u73b0\u56fe\u7247\u66f2\u7ebf\u62c9\u4f38\u6392\u5217\u5e03\u5c40\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528 html \u548c  \u5b9e\u73b0\u56fe\u7247\u66f2\u7ebf\u62c9\u4f38\u5e76\u5e03\u5c40\uff1f<\/strong><\/p>\n<p>\u60f3\u8981\u5b9e\u73b0\u56fe\u7247\u6309\u66f2\u7ebf\u62c9\u4f38\u5e76\u6392\u5217\u7684\u6548\u679c\uff0c\u53ef\u4ee5\u5229\u7528 CSS3 \u4e2d\u7684 transform \u5c5e\u6027\u6765\u5b9e\u73b0\u3002<\/p>\n<p><strong>\u66f2\u7ebf\u62c9\u4f38<\/strong><\/p>\n<p>\u5bf9\u4e8e\u66f2\u7ebf\u62c9\u4f38\uff0c\u53ef\u4ee5\u4f7f\u7528 transform: rotateY() \u5c5e\u6027\u6765\u5b9e\u73b0\u3002\u8be5\u5c5e\u6027\u53ef\u4ee5\u5c06\u5143\u7d20\u56f4\u7ed5 Y \u8f74\u8fdb\u884c\u65cb\u8f6c\uff0c\u4ece\u800c\u4ea7\u751f\u66f2\u7ebf\u6548\u679c\u3002\u4f46\u662f\uff0c\u8981\u4f7f\u66f2\u7ebf\u66f4\u52a0\u4e1d\u6ed1\uff0c\u9700\u8981\u4f7f\u7528\u8f83\u5c0f\u7684\u65cb\u8f6c\u89d2\u5ea6\uff0c\u5e76\u4e14\u53ef\u80fd\u9700\u8981\u7ed3\u5408 translate() \u548c skew() \u7b49\u5176\u4ed6\u5c5e\u6027\u3002<\/p>\n<p><strong>\u6392\u5217\u5e03\u5c40<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u5bf9\u4e8e\u6392\u5217\u5e03\u5c40\uff0c\u9700\u8981\u4f7f\u7528 position \u548c flexbox \u7b49\u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528 flex-direction: row \u4f7f\u5143\u7d20\u6c34\u5e73\u6392\u5217\uff0c\u5e76\u4f7f\u7528 justify-content: space-around \u4f7f\u5143\u7d20\u5747\u5300\u5206\u5e03\u3002<\/p>\n<p><strong>\u4e2d\u95f4\u884c<\/strong><\/p>\n<p>\u5982\u679c\u8981\u5b9e\u73b0\u4e2d\u95f4\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528 order \u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u987a\u5e8f\u3002\u901a\u8fc7\u5c06\u4e2d\u95f4\u884c\u7684 order \u8bbe\u7f6e\u4e3a\u4e00\u4e2a\u8f83\u5c0f\u7684\u503c\uff0c\u53ef\u4ee5\u5c06\u5176\u653e\u5728\u5176\u4ed6\u884c\u7684\u524d\u9762\u3002<\/p>\n<p><strong>\u63d0\u793a<\/strong><\/p>\n<ul>\n<li>\u5c1d\u8bd5\u4f7f\u7528\u4e0d\u540c\u7684 transform \u5c5e\u6027\u7ec4\u5408\u6765\u521b\u5efa\u6240\u9700\u7684\u66f2\u7ebf\u5f62\u72b6\u3002<\/li>\n<li>\u4f7f\u7528 transition \u5c5e\u6027\u53ef\u4ee5\u4e3a\u5143\u7d20\u6dfb\u52a0\u52a8\u753b\u6548\u679c\u3002<\/li>\n<li>\u5982\u679c CSS \u65e0\u6cd5\u6ee1\u8db3\u4f60\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u4f7f\u7528 JavaScript \u6216 canvas API \u6765\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u56fe\u50cf\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b\u4ee3\u7801<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u6f14\u793a\u56fe\u7247\u66f2\u7ebf\u62c9\u4f38\u548c\u6392\u5217\u5e03\u5c40\u7684\u793a\u4f8b\u4ee3\u7801\u7247\u6bb5\uff1a<\/p>\n<pre>&lt;div class=\"container\"&gt;\n  &lt;div class=\"item\"&gt;&lt;\/div&gt;\n  &lt;div class=\"item\"&gt;&lt;\/div&gt;\n  &lt;div class=\"item\"&gt;&lt;\/div&gt;\n&lt;\/div&gt;\n\n&lt;style&gt;\n.container {\n  display: flex;\n  flex-direction: row;\n  justify-content: space-around;\n}\n\n.item {\n  width: 100px;\n  height: 100px;\n  background-color: red;\n  transform: rotateY(5deg) skew(-5deg);\n}\n\n.item:nth-of-type(2) {\n  order: -1;\n}\n&lt;\/style&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u7528 HTML \u548c CSS \u5b9e\u73b0\u56fe\u7247\u66f2\u7ebf\u62c9\u4f38\u5e03\u5c40\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\u4f7f\u7528 html \u548c \u5b9e\u73b0\u56fe\u7247\u66f2\u7ebf\u62c9\u4f38\u5e76\u5e03\u5c40\uff1f \u60f3\u8981\u5b9e\u73b0\u56fe\u7247\u6309\u66f2\u7ebf\u62c9\u4f38\u5e76\u6392\u5217\u7684\u6548\u679c\uff0c\u53ef\u4ee5\u5229\u7528 CSS3 \u4e2d\u7684 transform \u5c5e\u6027\u6765\u5b9e\u73b0\u3002 \u66f2\u7ebf\u62c9\u4f38 \u5bf9\u4e8e\u66f2\u7ebf\u62c9\u4f38\uff0c\u53ef\u4ee5\u4f7f\u7528 transform: rotateY() \u5c5e\u6027\u6765\u5b9e\u73b0\u3002\u8be5\u5c5e\u6027\u53ef\u4ee5\u5c06\u5143\u7d20\u56f4\u7ed5 Y \u8f74\u8fdb\u884c\u65cb\u8f6c\uff0c\u4ece\u800c\u4ea7\u751f\u66f2\u7ebf\u6548\u679c\u3002\u4f46\u662f\uff0c\u8981\u4f7f\u66f2\u7ebf\u66f4\u52a0\u4e1d\u6ed1\uff0c\u9700\u8981\u4f7f\u7528\u8f83\u5c0f\u7684\u65cb\u8f6c\u89d2\u5ea6\uff0c\u5e76\u4e14\u53ef\u80fd\u9700\u8981\u7ed3\u5408 translate() \u548c skew() \u7b49\u5176\u4ed6\u5c5e\u6027\u3002 \u6392\u5217\u5e03\u5c40 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u5bf9\u4e8e\u6392\u5217\u5e03\u5c40\uff0c\u9700\u8981\u4f7f\u7528 position \u548c flexbox \u7b49\u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528 flex-direction: row \u4f7f\u5143\u7d20\u6c34\u5e73\u6392\u5217\uff0c\u5e76\u4f7f\u7528 justify-content: space-around \u4f7f\u5143\u7d20\u5747\u5300\u5206\u5e03\u3002 \u4e2d\u95f4\u884c \u5982\u679c\u8981\u5b9e\u73b0\u4e2d\u95f4\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528 order \u5c5e\u6027\u6765\u63a7\u5236\u5143\u7d20\u7684\u987a\u5e8f\u3002\u901a\u8fc7\u5c06\u4e2d\u95f4\u884c\u7684 order \u8bbe\u7f6e\u4e3a\u4e00\u4e2a\u8f83\u5c0f\u7684\u503c\uff0c\u53ef\u4ee5\u5c06\u5176\u653e\u5728\u5176\u4ed6\u884c\u7684\u524d\u9762\u3002 \u63d0\u793a \u5c1d\u8bd5\u4f7f\u7528\u4e0d\u540c\u7684 transform \u5c5e\u6027\u7ec4\u5408\u6765\u521b\u5efa\u6240\u9700\u7684\u66f2\u7ebf\u5f62\u72b6\u3002 \u4f7f\u7528 transition \u5c5e\u6027\u53ef\u4ee5\u4e3a\u5143\u7d20\u6dfb\u52a0\u52a8\u753b\u6548\u679c\u3002 \u5982\u679c CSS \u65e0\u6cd5\u6ee1\u8db3\u4f60\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u4f7f\u7528 JavaScript \u6216 canvas API \u6765\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u56fe\u50cf\u64cd\u4f5c\u3002 \u793a\u4f8b\u4ee3\u7801 [&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-28176","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28176","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=28176"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28176\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=28176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=28176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=28176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}