{"id":1939,"date":"2016-04-03T18:00:57","date_gmt":"2016-04-03T10:00:57","guid":{"rendered":"http:\/\/boweihe.me\/?p=1939"},"modified":"2016-04-03T18:00:57","modified_gmt":"2016-04-03T10:00:57","slug":"%e7%99%be%e5%ba%a6%e5%89%8d%e7%ab%af%e6%8a%80%e6%9c%af%e5%ad%a6%e9%99%a2-%e4%bb%bb%e5%8a%a1%e5%9b%9b%ef%bc%9a%e5%ae%9a%e4%bd%8d%e5%92%8c%e5%b1%85%e4%b8%ad%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/dayandcarrot.space\/?p=1939","title":{"rendered":"\u767e\u5ea6\u524d\u7aef\u6280\u672f\u5b66\u9662 \u4efb\u52a1\u56db\uff1a\u5b9a\u4f4d\u548c\u5c45\u4e2d\u95ee\u9898"},"content":{"rendered":"<h3>\u4efb\u52a1\uff1a<\/h3>\n<p><a href=\"http:\/\/ife.baidu.com\/task\/detail?taskId=4\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/ife.baidu.com\/task\/detail?taskId=4<\/a><\/p>\n<h3>\u6548\u679c\u56fe\uff1a<\/h3>\n<p><a href=\"http:\/\/boweihe.me\/wp-content\/uploads\/2016\/04\/\u5c4f\u5e55\u5feb\u7167-2016-04-03-\u4e0b\u53485.54.13.png\" rel=\"attachment wp-att-1940\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1940\" src=\"http:\/\/boweihe.me\/wp-content\/uploads\/2016\/04\/\u5c4f\u5e55\u5feb\u7167-2016-04-03-\u4e0b\u53485.54.13.png\" alt=\"\u5c4f\u5e55\u5feb\u7167 2016-04-03 \u4e0b\u53485.54.13\" width=\"1094\" height=\"712\" \/><\/a><\/p>\n<h3>\u6709\u7528\u7684\u53c2\u8003\u8d44\u6599\uff1a<\/h3>\n<ul>\n<li>CSS3\u6c34\u5e73\u5782\u76f4\u5c45\u4e2d\u5bf9\u9f50\uff1a<a href=\"http:\/\/www.w3cplus.com\/css\/vertically-center-content-with-css\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.w3cplus.com\/css\/vertically-center-content-with-css<\/a><\/li>\n<li>CSS Clip\u5c5e\u6027\uff1a<a href=\"http:\/\/www.w3school.com.cn\/cssref\/pr_pos_clip.asp\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.w3school.com.cn\/cssref\/pr_pos_clip.asp<\/a><\/li>\n<li>CSS3\u5706\u73af\u5012\u8ba1\u65f6\u6548\u679c(\u5e2e\u52a9\u6211\u56de\u5fc6\u8d77\u4e86Clip\u8fd9\u4e2a\u4e1c\u897f):<a href=\"http:\/\/www.yangqq.com\/web\/css3demo\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.yangqq.com\/web\/css3demo\/index.html<\/a><\/li>\n<li>CSS\u5c45\u4e2d\u6559\u7a0b\uff1a<a href=\"https:\/\/css-tricks.com\/centering-css-complete-guide\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/css-tricks.com\/centering-css-complete-guide\/<\/a><\/li>\n<li>\u5b9a\u4f4d\u8be6\u89e3(\u5173\u4e8eposition\u7684\u79cd\u79cd)\uff1a<a href=\"http:\/\/www.w3cplus.com\/css\/advanced-html-css-lesson2-detailed-css-positioning.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.w3cplus.com\/css\/advanced-html-css-lesson2-detailed-css-positioning.html<\/a><\/li>\n<\/ul>\n<h3>\u601d\u8def\uff1a<\/h3>\n<p>\u7070\u8272\u77e9\u5f62\u4f7f\u7528relative\u5b9a\u4f4d\uff0c\u7136\u540e\u8bbe\u5b9aleft\u4e0etop\u4e3a50%\uff0c\u7531\u4e8e\u5df2\u7ecf\u77e5\u9053\u6846\u7684\u5927\u5c0f\uff0c\u7528margin\u628a\u957f\u6b3e\u7684\u4e00\u534a\u8ddd\u79bb\u8865\u56de\u6765\u5c31\u884c\u4e86\u3002<br \/>\n\u4e24\u4e2a\u6247\u5f62\u5728\u77e9\u5f62\u7684div\u5185\u90e8\uff0c\u4f7f\u7528\u7edd\u5bf9\u5b9a\u4f4d\uff0c\u7528border-radius\u505a\u5706\u89d2\uff0cclip:rect\u526a\u5207\u3002<\/p>\n<h3>\u4ee3\u7801\uff1a<\/h3>\n<p>CodePen:\u00a0<a href=\"http:\/\/codepen.io\/idailylife\/full\/QNqJXe\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/codepen.io\/idailylife\/full\/QNqJXe\/<\/a><\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;div class=\"rectangle\"&gt;\n  &lt;div id=\"left_top\" class=\"qcircle\"&gt;\n  &lt;\/div&gt;\n  &lt;div id=\"right_bottom\" class=\"qcircle\"&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;<\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"lang:css decode:true \">.rectangle{\n  position: absolute;\n  width: 400px;\n  height: 200px;\n  top: 50%;\n  left: 50%;\n  margin-left: -200px;\n  margin-top:-100px;\n  background-color: #ccc;\n}\n.qcircle{\n  position:absolute;\n  width:100px;\n  height:100px;\n  border-radius:50px;\n  background-color:#fc0;\n}\n#left_top{\n  top: -50px;\n  left: -50px;\n  clip:rect(50px, 100px, 100px, 50px);\n}\n#right_bottom{\n  right: -50px;\n  bottom: -50px;\n  clip:rect(0, 50px, 50px, 0);\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4efb\u52a1\uff1a http:\/\/ife.baidu.com\/task\/detail?taskId=4 \u6548\u679c\u56fe\uff1a \u6709\u7528\u7684\u53c2\u8003\u8d44\u6599\uff1a CSS3\u6c34\u5e73\u5782\u76f4\u5c45\u4e2d\u5bf9\u9f50\uff1ahttp:\/\/www.w3cplus.com\/css\/vertically-center-content-with-css CSS Clip\u5c5e\u6027\uff1ahttp:\/\/www.w3school.com.cn\/cssref\/pr_pos_clip.asp CSS3\u5706\u73af\u5012\u8ba1\u65f6\u6548\u679c(\u5e2e\u52a9\u6211\u56de\u5fc6\u8d77\u4e86Clip\u8fd9\u4e2a\u4e1c\u897f):http:\/\/www.yangqq.com\/web\/css3demo\/index.html CSS\u5c45\u4e2d\u6559\u7a0b\uff1ahttps:\/\/css-tricks.com\/centering-css-complete-guide\/ \u5b9a\u4f4d\u8be6\u89e3(\u5173\u4e8eposition\u7684\u79cd\u79cd)\uff1ahttp:\/\/www.w3cplus.com\/css\/advanced-html-css-lesson2-detailed-css-positioning.html \u601d\u8def\uff1a \u7070\u8272\u77e9\u5f62\u4f7f\u7528relative\u5b9a\u4f4d\uff0c\u7136\u540e\u8bbe\u5b9aleft\u4e0etop\u4e3a50%\uff0c\u7531\u4e8e\u5df2\u7ecf\u77e5\u9053\u6846\u7684\u5927\u5c0f\uff0c\u7528margin\u628a\u957f\u6b3e\u7684\u4e00\u534a\u8ddd\u79bb\u8865\u56de\u6765\u5c31\u884c\u4e86\u3002 \u4e24\u4e2a\u6247\u5f62\u5728\u77e9\u5f62\u7684div\u5185\u90e8\uff0c\u4f7f\u7528\u7edd\u5bf9\u5b9a\u4f4d\uff0c\u7528border-radius\u505a\u5706\u89d2\uff0cclip:rect\u526a\u5207\u3002 \u4ee3\u7801\uff1a CodePen:\u00a0http:\/\/codepen.io\/idailylife\/full\/QNqJXe\/ &lt;div class=&#8221;rectangle&#8221;&gt; &lt;div id=&#8221;left_top&#8221; class=&#8221;qcircle&#8221;&gt; &lt;\/div&gt; &lt;div id=&#8221;right_bottom&#8221; class=&#8221;qcircle&#8221;&gt; &lt;\/div&gt; &lt;\/div&gt; &nbsp; .rectangle{ position: absolute; width: 400px; height: 200px; top: 50%; left: 50%; margin-left: -200px; margin-top:-100px; background-color: #ccc; } .qcircle{ position:absolute; width:100px; height:100px; border-radius:50px; background-color:#fc0; } #left_top{ top: -50px; left: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8],"tags":[34,53,140],"class_list":["post-1939","post","type-post","status-publish","format-standard","hentry","category-study","category-technical","tag-css","tag-html","tag-140"],"_links":{"self":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/1939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1939"}],"version-history":[{"count":0,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/1939\/revisions"}],"wp:attachment":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}