简体   繁体   English

React Native:为滚动视图底部的文本添加不透明度

[英]React Native: Add opacity to text at the bottom of scrollview

Do you guys have any idea how to achieve this?你们知道如何实现这一目标吗? The text is wrapped in ScrollView with maxHeight 400.文本包裹在 ScrollView 中,maxHeight 为 400。

 <ScrollView style={{maxHeight: 400}}>
   <Text>{text}</Text>
 </ScrollView>

This is what I want:这就是我要的:

在此处输入图片说明

I hope this works for you :我希望这对你有用:

<TouchableOpacity
    style={"row"}
    onPress={() => {
        onClick(params)
    }}>
    <View>
        <Text>1</Text>
        <Text>2</Text>
        <Text>4</Text>
    </View>
</TouchableOpacity>

And here is live demo : https://snack.expo.io/@maifeeulasad/delicious-marshmallows这是现场演示: https : //snack.expo.io/@maifeeulasad/delicious-marshmallows

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM