简体   繁体   English

如何使 SVG 图像在 react-native 中变得模糊

[英]How to make a SVG image become blurred in react-native

I want to use a svg with 2 blurred corners to have a gradient background in react native, but the issue is those blurred corners become 2 circle.我想使用带有 2 个模糊角的 svg 在 React Native 中使用渐变背景,但问题是那些模糊角变成了 2 个圆圈。 Any solutions?.任何解决方案? Here is the images:这是图像:

我想要的那个

输出

I suggest using react-native-linear-gradient , instead of having 2 SVGs in the corners of the component.我建议使用react-native-linear-gradient ,而不是在组件的角落使用 2 个 SVG。 You can specify which colors and where the gradient starts and ends on both X and Y axises.您可以指定哪个 colors 以及渐变在 X 轴和 Y 轴上的开始和结束位置。

But if you are determined to use them, I recommend using react-native-blur and adjusting the styling of the component according to your needs但如果你确定要使用它们,我建议使用react-native-blur并根据你的需要调整组件的样式

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

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