{"id":165426,"date":"2020-10-08T01:06:58","date_gmt":"2020-10-07T17:06:58","guid":{"rendered":"http:\/\/4563.org\/?p=165426"},"modified":"2020-10-08T01:06:58","modified_gmt":"2020-10-07T17:06:58","slug":"%e5%88%9d%e5%ad%a6-css%ef%bc%8c%e9%97%ae%e4%b8%80%e4%b8%aa%e6%af%94%e8%be%83%e5%9f%ba%e7%a1%80%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=165426","title":{"rendered":"\u521d\u5b66 CSS\uff0c\u95ee\u4e00\u4e2a\u6bd4\u8f83\u57fa\u7840\u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u521d\u5b66 CSS\uff0c\u95ee\u4e00\u4e2a\u6bd4\u8f83\u57fa\u7840\u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nurupo <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u4e0d\u4f7f\u7528 position\uff1aabsolute\uff0c\u5982\u4f55\u628a\u5143\u7d20\u653e\u5728\u4e24\u4e2a div \u4e2d\u95f4\uff1f \u6bd4\u5982\u8bf4\u628a\u56fe\u4e2d\u4e54\u6c0f\u5bb6\u7684 h3 \u6807\u7b7e\u653e\u5728\u4e0a\u4e0b\u4e24\u4e2a div \u4e2d\u95f4\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/10\/20201010_5f819b517675c.png\" alt=\"\u521d\u5b66 CSS\uff0c\u95ee\u4e00\u4e2a\u6bd4\u8f83\u57fa\u7840\u7684\u95ee\u9898\" \/><\/p>\n<pre><code>&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt;     &lt;meta charset=\"UTF-8\"&gt;     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;     &lt;title&gt;Document&lt;\/title&gt;     &lt;style&gt;         * {             margin: 0;             padding: 0;         }          .product {             width: 560px;             height: 880px;             border: 3px solid #eeeeee;             margin: 20px;         }          .product-header {             width: 560px;             height: 560px;             background-color: #f8f8f8;             display: table-cell;             text-align: center;             vertical-align: middle;         }                  .product-img {             width: 455px;             height: 455px;         }          .product-content {             position: relative;             margin: 40px;         }          .product-brand {             position: absolute;             border: 1px solid #cda3b1;             background-color: #cda3b1;             color: #ffffff;             top: -70px;             padding: 10px;             font-size: 26px;             font-weight: 400;         }          .product-title {             font-weight: 400;             display: -webkit-box;             word-break: break-word;             -webkit-line-clamp: 2;             overflow: hidden;             -webkit-box-orient: vertical;             text-overflow: ellipsis;             font-size: 40px;         }          .product-discount {             float: left;             list-style: none;             border: 1px solid #c82b50;             margin: 20px 10px 0px 0px;             font-size: 26px;             color: #c82b50;             padding: 2px;         }          .product-price {             clear: both;             float: left;             list-style: none;             line-height: 70px;             margin: 10px 0px;         }          .product-price-text {             font-size: 40px;             font-weight: 700;             color: #f10604;         }          .product-similar {             float: right;             list-style: none;             width: 160px;             height: 70px;             border: 1px solid #ffe6ea;             background-color: #ffe6ea;             border-radius: 999em;             text-align: center;             line-height: 70px;             margin: 10px 0px;         }          .product-similar-text {             font-size: 30px;             font-weight: 700;             color: #cd2852;         }     &lt;\/style&gt; &lt;\/head&gt; &lt;body&gt;     &lt;div class=\"product\"&gt;         &lt;div class=\"product-header\"&gt;             &lt;img class=\"product-img\" src=\"http:\/\/img.alicdn.com\/imgextra\/i2\/3161207834\/O1CN01Lwd1Q427k1MvtNOA3_!!3161207834.jpg\"&gt;         &lt;\/div&gt;         &lt;div class=\"product-content\"&gt;             &lt;h3 class=\"product-brand\"&gt;\u4e54\u6c0f\u5bb6&lt;\/h3&gt;             &lt;h1 class=\"product-title\"&gt;\u98ce\u8863\u5916\u5957\u5973 2020 \u65b0\u6b3e\u4e2d\u957f\u6b3e\u6d41\u884c\u82f1\u4f26\u98ce\u8fc7\u819d\u6625\u79cb\u97e9\u7248\u5bbd\u677e\u6c14\u8d28\u5927\u8863&lt;\/h1&gt;             &lt;ul&gt;                 &lt;li class=\"product-discount\"&gt;                     &lt;p class=\"product-discount-info\"&gt;\u6bcf 300 \u51cf 30&lt;\/p&gt;                 &lt;\/li&gt;                 &lt;li class=\"product-discount\"&gt;                     &lt;p class=\"product-discount-info\"&gt;\u6ee1 128 \u51cf 10&lt;\/p&gt;                 &lt;\/li&gt;             &lt;\/ul&gt;             &lt;ul&gt;                 &lt;li class=\"product-price\"&gt;                     &lt;span class=\"product-price-text\"&gt;\u00a5&amp;nbsp;168&lt;\/span&gt;                 &lt;\/li&gt;                 &lt;li class=\"product-similar\"&gt;                     &lt;span class=\"product-similar-text\"&gt;\u770b\u76f8\u4f3c&lt;\/span&gt;                 &lt;\/li&gt;             &lt;\/ul&gt;         &lt;\/div&gt;              &lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3649694\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : seki <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3a\u4ec0\u4e48\u4e0d\u7528\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649695\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : nurupo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @seki \u60f3\u95ee\u95ee\u6709\u6ca1\u6709\u4ec0\u4e48\u5176\u4ed6\u7684\u65b9\u6cd5\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649696\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jjplay <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528\u8d1f margin\uff0c\u6211\u5f04\u4e86\u4e2a\u6f14\u793a\uff0c\u65b9\u4fbf\u67e5\u770b \u80cc\u666f\u8272\u6539\u6210\u4e86 pink<\/p>\n<p>jsrun.net\/KN6Kp                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649697\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhangkunduanfei <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5355\u7eaf\u653e\u4e2d\u95f4\u7684\u8bdd \u4e2d\u95f4\u90a3\u4e2a div display\uff1aflex\uff0c\u7136\u540e justify-content \u548c align-items \u7ed9 center \u5c31\u53ef\u4ee5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649698\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : nurupo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jjplay \u611f\u8c22\u5927\u4f6c\u89e3\u7b54                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649699\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : nurupo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zhangkunduanfei \u4e0d\u662f\u8981\u5c45\u4e2d\u7684\u6548\u679c\uff0c\u4e0d\u8fc7\u8fd8\u662f\u8c22\u8c22\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649700\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zachlhb <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             margin \u8bbe\u7f6e\u6c34\u5e73\u5c45\u4e2d\uff0cline-height \u8bbe\u7f6e\u5782\u76f4\u5c45\u4e2d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649701\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MiracleKagari <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             brand float\uff0ctitle margin top\uff0c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u521d\u5b66 CSS\uff0c\u95ee\u4e00\u4e2a\u6bd4\u8f83\u57fa\u7840\u7684\u95ee\u9898&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/165426"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=165426"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/165426\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=165426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=165426"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=165426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}