它是否具有相当于box-sizing的功能:flexbox for React Native中的border-box? [英] Does it exist an equivalent of box-sizing: border-box in flexbox for React Native?
本文介绍了它是否具有相当于box-sizing的功能:flexbox for React Native中的border-box?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望我的包装盒的大小不因边距和填充而改变.
I would like the size of my boxes not to be changed by margin and padding.
推荐答案
React Native为所有视图设置样式,就像设置了框大小:border-box
.请参阅以下代码:
React Native styles all views as if box-sizing: border-box
is set. See this code: https://github.com/facebook/react-native/blob/5aa1fb3ff326a429e33a443576da866f2a63c20c/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java#L632
这篇关于它是否具有相当于box-sizing的功能:flexbox for React Native中的border-box?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文