vuetify v1.1 我可以为 v-card 颜色设置一些透明度吗?

5 vue.js vuetify.js

目前我显示一个 v-card 如下:

                      <v-parallax :src="require('../../assets/images/member.jpeg')" height="100%">
                        <v-container grid-list-xl pt-5 style="max-height: 10em;">
                        <v-layout row justify-center align-center>
                          <v-flex xs6 sm6 md3>
                            <v-card class="member__account flexcard">
                              <v-card-title class="section__title justify-center">
                                <div class="headline mt-1 mb-1 display-1 text-xs-center">MY ACCOUNT</div>
                              </v-card-title>
                            </v-card>
                          </v-flex>
                        </v-layout>
                      </v-container>
Run Code Online (Sandbox Code Playgroud)

...

三重奏“我的帐户”显示在白色 v 卡背景上

但是我在下面有一个 v 视差图像,我想给 v 卡白色背景一些透明度,让视差图像在其中出现一点......

是否可以 ?如果是,如何...感谢您的反馈

小智 7

您可以在颜色属性中使用rgb。看起来像这样

<v-card color="rgb(255, 0, 0, 0.2)"> </v-card>
Run Code Online (Sandbox Code Playgroud)

您可以在 rgb 的最后一个值中设置透明度。 RGB(颜色,颜色,颜色,setTransparency)

您可以将透明度值设置为 0 到 1。

1 = 不透明 0 = 100% 透明


小智 5

已解决:只需更改默认的 .transparent 类:

.transparent {
  background-color: transparent!important;
  border-color: transparent!important;
 }
Run Code Online (Sandbox Code Playgroud)

.transparent {
   background-color: white!important;
   opacity: 0.65;
   border-color: transparent!important;
 }
Run Code Online (Sandbox Code Playgroud)