如何使用 native-base 在 react-native 中的图像上制作半透明按钮?

how to make translucent buttons over a image in react-native using native-base?

我试图制作如图所示的按钮 screenshot.but 无法弄清楚如何让它们看起来半透明。

import React, { Component } from 'react';
import {Image} from 'react-native';
import {Button, Content} from 'native-base';

export default class AppBody extends Component {
    render() {
        return (
            <Content>

                <Image source={require('./img/bg3.jpg')} style={{ width: 360, height: 509 }}>




                </Image>
            </Content>
        );
    }
};

背景颜色使用 rgba 值如下:

backgroundColor: 'rgba(52, 52, 52, 0.8)'

这会将其设置为具有 80% 不透明度的灰色,该值源自不透明度小数 0.8。该值可以是 0.0 到 1.0 之间的任何值。

复制自