模糊背景透明度
是否可以在不使用背景图像的情况下模糊视图?我想展示家长内容在上面背景模糊视图 in modal.
类似这样的:
尝试过反应本机模糊 https://github.com/react-native-community/react-native-blur :
它实际上模糊了背景图像。我想模糊并显示模式后面的内容。
尝试过与反应本机覆盖 https://github.com/brentvatne/react-native-overlay :但没有变化。
好吧,如果你是
使用世博会
那么你应该去看看这个链接here https://docs.expo.io/versions/latest/sdk/blur-view
else如果你像我一样
谁喜欢用'反应本机初始化'并且想要一些基于模糊效果的视图,那么我有这个给你!
https://github.com/voronianski/react-native-effects-view https://github.com/voronianski/react-native-effects-view
一个很棒的图书馆
使用它会非常简单
“如果对话框打开,则渲染模糊视图,否则渲染简单”,
这是一个简单的例子来说明基本的使用方法!
...imports
var EffectsView = require('react-native-effects-view');
var App = React.createClass({
renderVibrant() {
return (
<View>
<Text style={styles.text}>Do you feel blurry??</Text>
</View>
);
},
render() {
return (
<EffectsView
style={styles.view}
blurStyle="dark"
vibrantContent={this.renderVibrant()}
>
<Image style={styles.bg} source={require('image!bg')} />
</EffectsView>
);
}
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)