{"id":772,"date":"2018-02-25T20:40:33","date_gmt":"2018-02-25T12:40:33","guid":{"rendered":"http:\/\/60.205.208.74\/2018\/02\/25\/css-padding%ef%bc%88%e5%a1%ab%e5%85%85%ef%bc%89\/"},"modified":"2018-02-25T20:40:33","modified_gmt":"2018-02-25T12:40:33","slug":"css-padding%ef%bc%88%e5%a1%ab%e5%85%85%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.puzi7.net\/?p=772","title":{"rendered":"CSS Padding\uff08\u586b\u5145\uff09"},"content":{"rendered":"<span itemprop=\"description\"><div class=\"article-body\">\n<div class=\"article-intro\" id=\"content\">\n<h1>CSS <span class=\"color_h1\">Padding\uff08\u586b\u5145\uff09<\/span><br \/>\n<\/h1>\n<hr>\n<p class=\"intro\">CSS Padding\uff08\u586b\u5145\uff09\u5c5e\u6027\u5b9a\u4e49\u5143\u7d20\u8fb9\u6846\u4e0e\u5143\u7d20\u5185\u5bb9\u4e4b\u95f4\u7684\u7a7a\u95f4\u3002<\/p>\n<hr>\n<h2>Padding\uff08\u586b\u5145\uff09<\/h2>\n<p>\u5f53\u5143\u7d20\u7684 Padding\uff08\u586b\u5145\uff09\uff08\u5185\u8fb9\u8ddd\uff09\u88ab\u6e05\u9664\u65f6\uff0c\u6240&#8221;\u91ca\u653e&#8221;\u7684\u533a\u57df\u5c06\u4f1a\u53d7\u5230\u5143\u7d20\u80cc\u666f\u989c\u8272\u7684\u586b\u5145\u3002<\/p>\n<p>\u5355\u72ec\u4f7f\u7528\u586b\u5145\u5c5e\u6027\u53ef\u4ee5\u6539\u53d8\u4e0a\u4e0b\u5de6\u53f3\u7684\u586b\u5145\u3002\u7f29\u5199\u586b\u5145\u5c5e\u6027\u4e5f\u53ef\u4ee5\u4f7f\u7528\uff0c\u4e00\u65e6\u6539\u53d8\u4e00\u5207\u90fd\u6539\u53d8\u3002<\/p>\n<h2>\u53ef\u80fd\u7684\u503c<\/h2>\n<table class=\"reference\">\n<tbody>\n<tr>\n<th align=\"left\">\u503c<\/th>\n<th align=\"left\">\u8bf4\u660e<\/th>\n<\/tr>\n<tr>\n<td><i>length<\/i><\/td>\n<td>\u5b9a\u4e49\u4e00\u4e2a\u56fa\u5b9a\u7684\u586b\u5145(\u50cf\u7d20, pt, em,\u7b49)<\/td>\n<\/tr>\n<tr>\n<td><i>%<\/i><\/td>\n<td>\u4f7f\u7528\u767e\u5206\u6bd4\u503c\u5b9a\u4e49\u4e00\u4e2a\u586b\u5145<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n<hr>\n<h2>\u586b\u5145- \u5355\u8fb9\u5185\u8fb9\u8ddd\u5c5e\u6027<\/h2>\n<p>\u5728CSS\u4e2d\uff0c\u5b83\u53ef\u4ee5\u6307\u5b9a\u4e0d\u540c\u7684\u4fa7\u9762\u4e0d\u540c\u7684\u586b\u5145\uff1a<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b<\/h2>\n<div class=\"example_code notranslate\">\npadding-top:25px;<br \/>\npadding-bottom:25px;<br \/>\npadding-right:50px;<br \/>\npadding-left:50px;<\/div>\n<p>\n<\/div>\n<p><\/p>\n<hr>\n<h2>\u586b\u5145 &#8211; \u7b80\u5199\u5c5e\u6027<\/h2>\n<p>\u4e3a\u4e86\u7f29\u77ed\u4ee3\u7801\uff0c\u5b83\u53ef\u4ee5\u5728\u4e00\u4e2a\u5c5e\u6027\u4e2d\u6307\u5b9a\u7684\u6240\u6709\u586b\u5145\u5c5e\u6027\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u6240\u8c13\u7684\u7f29\u5199\u5c5e\u6027\u3002\u6240\u6709\u7684\u586b\u5145\u5c5e\u6027\u7684\u7f29\u5199\u5c5e\u6027\u662f&#8221;padding&#8221;:<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b<\/h2>\n<div class=\"example_code\">\npadding:25px 50px;<\/div>\n<p>\n<\/div>\n<p>Padding\u5c5e\u6027\uff0c\u53ef\u4ee5\u6709\u4e00\u5230\u56db\u4e2a\u503c\u3002<\/p>\n<p><b>\u00a0\u00a0padding:25px 50px 75px 100px;<\/b><\/p>\n<ul>\n<li>\u4e0a\u586b\u5145\u4e3a25px<\/li>\n<li>\u53f3\u586b\u5145\u4e3a50px<\/li>\n<li>\u4e0b\u586b\u5145\u4e3a75px<\/li>\n<li>\u5de6\u586b\u5145\u4e3a100px<\/li>\n<\/ul>\n<p><b>\u00a0\u00a0padding:25px 50px 75px;<\/b><\/p>\n<ul>\n<li>\u4e0a\u586b\u5145\u4e3a25px<\/li>\n<li>\u5de6\u53f3\u586b\u5145\u4e3a50px<\/li>\n<li>\u4e0b\u586b\u5145\u4e3a75px<\/li>\n<\/ul>\n<p><b>\u00a0\u00a0padding:25px 50px;<\/b><\/p>\n<ul>\n<li>\u4e0a\u4e0b\u586b\u5145\u4e3a25px<\/li>\n<li>\u5de6\u53f3\u586b\u5145\u4e3a50px<\/li>\n<\/ul>\n<p><b>\u00a0\u00a0padding:25px;<\/b><\/p>\n<ul>\n<li>\u6240\u6709\u7684\u586b\u5145\u90fd\u662f25px<\/li>\n<\/ul>\n<hr>\n<div class=\"tryit_ex\">\n<img decoding=\"async\" src=\"\/images\/tryitimg.gif\" width=\"40\" height=\"46px\" alt=\"Examples\"><\/p>\n<h2>\u66f4\u591a\u5b9e\u4f8b<\/h2>\n<\/div>\n<p>\n\u8fd9\u4e2a\u4f8b\u5b50\u6f14\u793a\u4e86\u4f7f\u7528\u7f29\u5199\u5c5e\u6027\u8bbe\u7f6e\u5728\u4e00\u4e2a\u58f0\u660e\u4e2d\u7684\u6240\u6709\u586b\u5145\u5c5e\u6027\uff0c\u53ef\u4ee5\u6709\u4e00\u5230\u56db\u4e2a\u503c\u3002<\/p>\n<p>\n\u8fd9\u4e2a\u4f8b\u5b50\u6f14\u793a\u4e86\u5982\u4f55\u8bbe\u7f6e\u5143\u7d20\u5de6\u586b\u5145\u3002<\/p>\n<p>\n\u8fd9\u4e2a\u4f8b\u5b50\u6f14\u793a\u4e86\u5982\u4f55\u8bbe\u7f6e\u5143\u7d20\u53f3\u586b\u5145\u3002.<\/p>\n<p>\n\u8fd9\u4e2a\u4f8b\u5b50\u6f14\u793a\u4e86\u5982\u4f55\u8bbe\u7f6e\u5143\u7d20\u4e0a\u586b\u5145\u3002<\/p>\n<p>\n\u8fd9\u4e2a\u4f8b\u5b50\u6f14\u793a\u4e86\u5982\u4f55\u8bbe\u7f6e\u5143\u7d20\u4e0b\u586b\u5145\u3002<\/p>\n<hr>\n<h2>\u6240\u6709\u7684CSS\u586b\u5145\u5c5e\u6027<\/h2>\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"1\" class=\"reference\">\n<tbody>\n<tr>\n<th width=\"20%\" align=\"left\">\u5c5e\u6027<\/th>\n<th width=\"80%\" align=\"left\">\u8bf4\u660e<\/th>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/pr-padding.html\">padding<\/a><\/td>\n<td>\u4f7f\u7528\u7f29\u5199\u5c5e\u6027\u8bbe\u7f6e\u5728\u4e00\u4e2a\u58f0\u660e\u4e2d\u7684\u6240\u6709\u586b\u5145\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/pr-padding-bottom.html\">padding-bottom<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u5e95\u90e8\u586b\u5145<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/pr-padding-left.html\">padding-left<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u5de6\u90e8\u586b\u5145<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/pr-padding-right.html\">padding-right<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u53f3\u90e8\u586b\u5145<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/pr-padding-top.html\">padding-top<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u9876\u90e8\u586b\u5145<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/p><\/div>\n<span>","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\"><span itemprop=\"description\">CSS Padding\uff08\u586b\u5145\uff09 CSS Padding\uff08\u586b\u5145\uff09\u5c5e\u6027\u5b9a\u4e49\u5143\u7d20\u8fb9\u6846\u4e0e\u5143\u7d20\u5185\u5bb9\u4e4b&hellip;<\/span><\/p>\n<p class=\"more-link-p btn-align-right\"><a class=\"green zoom-btn\" href=\"https:\/\/www.puzi7.net\/?p=772\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,29,7],"tags":[53],"class_list":["post-772","post","type-post","status-publish","format-standard","hentry","category-css","category-frontend","category-basic","tag-css","zoom-theme-has-thumb"],"_links":{"self":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=772"}],"version-history":[{"count":0,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/772\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}