{"id":5680,"date":"2017-02-21T15:57:53","date_gmt":"2017-02-21T07:57:53","guid":{"rendered":"https:\/\/sdeno.com\/?p=5680"},"modified":"2017-03-05T20:48:14","modified_gmt":"2017-03-05T12:48:14","slug":"react-native%e6%a0%b7%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=5680","title":{"rendered":"react native css\u6837\u5f0f"},"content":{"rendered":"<p>react native \u5e03\u5c40 RN css \u6837\u5f0f<br \/>\n<a href=\"https:\/\/sdeno.com\/wp-content\/uploads\/2017\/02\/react_native.txt\">react_native<\/a><\/p>\n<p>\u5728react native\u4e2d\u4f7f\u7528\u7684\u6837\u5f0f\u5e03\u5c40\u57fa\u672c\u90fd\u662fflex box\u7684\u5e03\u5c40\u65b9\u5f0f<\/p>\n<p><span style=\"color: #ff0000;\">\u4f5c\u7528\u5728\u7236\u5bb9\u5668:<\/span><\/p>\n<p>flexDirection \/\/\u63a7\u5236\u5b50\u5143\u7d20\u7684\u6392\u5217\u65b9\u5f0f<br \/>\n&#8211;row\uff1a\u6a2a\u5411\u5e03\u5c40<br \/>\n&#8211;column\uff1a\u7eb5\u5411\u5e03\u5c40<\/p>\n<p>&nbsp;<\/p>\n<p>alignItems \/\/\u63a7\u5236\u5b50\u5143\u7d20\u7684\u5bf9\u9f50\u65b9\u5f0f\uff0c\uff08\u7ad6\u76f4\u65b9\u5411\uff09<br \/>\n&#8211;flex-start\uff1a\u4e0e\u7236\u7ec4\u4ef6\u7684\u9876\u90e8\u5bf9\u9f50<br \/>\n&#8211;flex-end\uff1a\u4e0e\u7236\u7ec4\u4ef6\u7684\u5e95\u90e8\u5bf9\u9f50<br \/>\n&#8211;center\uff1a\u5904\u4e8e\u7236\u5bb9\u5668\u7684\u4e2d\u95f4\u4f4d\u7f6e (\u8bbe\u7f6e\u6b64\u503c\u540e\uff0c\u5982\u679c\u5b50\u5143\u7d20\u6709\u8bbe\u7f6eflex\u503c\uff0c\u90a3\u4e48height:100%\u5c31\u6ca1\u6548\u679c\uff0cwidht\u4ecd\u7136\u6309\u6bd4\u4f8b\u5206\u914d)<br \/>\n&#8211;stretch\uff1a\u7ad6\u76f4\u4e0a\u586b\u5145\u6574\u4e2a\u5bb9\u5668\uff0c\u5b50\u5143\u7d20\u4e0d\u80fd\u8bbe\u7f6e\u9ad8\u5ea6<\/p>\n<p>&nbsp;<\/p>\n<p>justifyContent \/\/\u63a7\u5236\u5b50\u5143\u7d20\u7684\u5bf9\u9f50\u65b9\u5f0f\uff0c\uff08\u6c34\u5e73\u65b9\u5411\uff09<br \/>\n&#8211;flex-start\uff1a\u4f38\u7f29\u9879\u76ee\u4e0e\u7236\u5bb9\u5668\u5de6\u7aef\u9760\u9f50\u3002<br \/>\n&#8211;flex-end\uff1a\u4e0e\u7236\u5bb9\u5668\u53f3\u7aef\u9760\u9f50\u3002<br \/>\n&#8211;center\uff1a\u6c34\u5e73\u5c45\u4e2d\u3002<br \/>\n&#8211;space-between\uff1a\u7b2c\u4e00\u4e2a\u5b50\u7ec4\u4ef6\u4f4d\u4e8e\u7236\u5bb9\u5668\u5de6\u7aef\uff0c\u6700\u540e\u4e00\u4e2a\u5b50\u7ec4\u4ef6\u4f4d\u4e8e\u7236\u5bb9\u5668\u6700\u53f3\u7aef\u3002\u7136\u540e\u5e73\u5747\u5206\u914d\u5728\u7236\u5bb9\u5668\u6c34\u5e73\u65b9\u5411\u4e0a\u3002<br \/>\n&#8211;space-around\uff1a\u6240\u6709\u5b50\u7ec4\u4ef6\u5e73\u5747\u5206\u914d\u5728\u7236\u5bb9\u5668\u7684\u6c34\u5e73\u65b9\u5411\u4e0a\uff0c\u5de6\u53f3\u90fd\u6709\u7559\u7a7a\u9699<\/p>\n<p>flexWrap<br \/>\n&#8211;nowrap:\u5373\u4f7f\u7a7a\u95f4\u4e0d\u591f\u4e5f\u4e0d\u6362\u884c\u3002<br \/>\n&#8211;wrap:\u7a7a\u95f4\u4e0d\u591f\u7684\u8bdd\u81ea\u52a8\u6362\u884c\u3002<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p><span style=\"color: #ff0000;\">\u4f5c\u7528\u5728\u5b50\u5bb9\u5668:<\/span><\/p>\n<p>alignSelf \/\/\u8bbe\u7f6e\u5355\u4e2a\u5143\u7d20\u5bf9\u9f50\u65b9\u5f0f<br \/>\n&#8211;auto:\u6309\u7167\u81ea\u8eab\u8bbe\u7f6e\u7684\u5bbd\u9ad8\u6765\u663e\u793a\uff0c\u5982\u679c\u6ca1\u8bbe\u7f6e\uff0c\u6548\u679c\u8ddfstreth\u4e00\u6837\u3002<br \/>\n&#8211;flex-start:\u4e0e\u7236\u5bb9\u5668\u9876\u90e8\u5bf9\u9f50\u3002<br \/>\n&#8211;flex-end:\u4e0e\u7236\u5bb9\u5668\u5e95\u90e8\u5bf9\u9f50\u3002<br \/>\n&#8211;center:\u4f4d\u4e8e\u5782\u76f4\u4f4d\u7f6e\u3002<br \/>\n&#8211;streth:\u5782\u76f4\u62c9\u4f38\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>flex \/\/\u6548\u679c\u5bbd\u3001\u9ad8\u5747\u6309\u6bd4\u4f8b\u5206\u914d<br \/>\n1:\u5bbd\u5ea6\u966a\u6570 (\u5982\u679c\u53ea\u6709\u4e00\u4e2a\u5b50\u5143\u7d20\u76f8\u5f53\u4e8e \u5bbd100% \u9ad8100%)<br \/>\n2:\u5bbd\u5ea6\u966a\u6570<br \/>\n3:\u5bbd\u5ea6\u966a\u6570<br \/>\n\u2026<\/p>\n<p>https:\/\/sanwen8.cn\/p\/3fdlM7q.html<\/p>\n<p>&nbsp;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>RN\u81ea\u5e26\u7684\u6837\u5f0f\u672c\u8eab\u5c31\u6709\u9650\u4e0d\u8ddfpc\u7aef\u4e00\u6837\u90a3\u4e48\u4e30\u5bcc\uff0c\u8fd9\u91cc\u5217\u51faRN\u80fd\u8bc6\u522b\u51fa\u6765\u7684css\u5c5e\u6027<\/p>\n<p>alignltems<br \/>\nalignSelf<br \/>\nbackfaceVisibility<br \/>\nbackgroundColor<br \/>\nborderBottomColor<br \/>\nborderBottomLeftRadius<br \/>\nborderBottomRightRadius<br \/>\nborderBottomWidth<br \/>\nborderColor<br \/>\nborderLeftWidth<br \/>\nborderRadius<br \/>\nborderRightColor<br \/>\nborderRightWidth<br \/>\nborderStyle<br \/>\nborderTopLeftRadius<br \/>\nborderTopRightRadius<br \/>\nborderTopWidth<br \/>\nborderWidth<br \/>\ndecomposedMatrix<br \/>\nelevation<br \/>\nflex<br \/>\nflexBasis<br \/>\nflexDirection<br \/>\nflexGrow<br \/>\nflexShrink<br \/>\nflexWrap<br \/>\nfontFamily<br \/>\nfontSize<br \/>\nfontStyle<br \/>\nfontVariant<br \/>\nfontWeight<br \/>\njustifyContent<br \/>\nletterSpacing<br \/>\nlineHeight<br \/>\nmargin<br \/>\nmarginBottom<br \/>\nmarginHorizontal<br \/>\nmarginVertical<br \/>\nmaxHeight<br \/>\nopacity<br \/>\noverflow<br \/>\noverlayColor<br \/>\npaddingHorizontal<br \/>\npaddingVertical<br \/>\nresizeMode<br \/>\nrotation<br \/>\nscaleX<br \/>\nscaleY<br \/>\nshadowColor<br \/>\nshadowOffset<br \/>\nshadowOpacity<br \/>\nshadowRadius<br \/>\ntextAlign<br \/>\ntextAlignVertical<br \/>\ntextDecorationColor<br \/>\ntextDecorationLine<br \/>\ntextDecorationStyle<br \/>\ntextShadowColor<br \/>\ntextShadowOffset<br \/>\ntextShadowRadius<br \/>\ntintColor<br \/>\ntransform<br \/>\ntransformMatrix<br \/>\ntranslateX<br \/>\ntranslateY<br \/>\nwritingDirection<br \/>\nzIndex<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>react native \u5e03\u5c40 RN css \u6837\u5f0f react_native \u5728react native\u4e2d\u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,11],"tags":[],"class_list":["post-5680","post","type-post","status-publish","format-standard","hentry","category-css3","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/5680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5680"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/5680\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}