【发布时间】:2016-06-21 15:20:28
【问题描述】:
我想使用一个 scrollView,当我在顶部滚动时,它具有顶部元素的背景颜色(绿色),而当它在底部反弹时,它具有底部元素的颜色(白色)。我不确定我该怎么做。
<ScrollView style={{backgroundColor: MColor.WHITE, marginTop: 64, height: Display.height - 64 - 72}}>
<View style={{backgroundColor: 'green', height: 200}} />
<View style={{backgroundColor: 'white', height: 800}} />
</ScrollView>
感谢任何帮助,可能有人可以在底部和顶部设置假视图,但我不确定如何准确地做到这一点。
【问题讨论】:
标签: react-native react-native-scrollview