css 设置无背景色

14 篇文章 0 订阅
7 篇文章 0 订阅

问题描述

大家好!我是夏小花,今天是2024年4月22日|农历三月十四,今天这篇文章主要以去除背景颜色为主题 ,详细代码如下

解决方案

这段是vue页面中的 代码,现在我要将

<view style="display: flex; flex-wrap: wrap; justify-content: space-between; width: 100%; margin: -20rpx auto;">

这view的背景色改为透明色,具体实现思路如下:

代码示例

<template>
  <view>
      <view class="search_view">
          <uni-search-bar placeholder="输入关键词进行查询" v-model="inputValue" bgColor="#f3f3f3" @confirm="search" @input="input" class="search_bar"/>
        <view>
            <view style="margin: 0 auto;margin-top: 40rpx; width: 100%;">
                <view style="display: flex; flex-wrap: wrap; justify-content: space-between; width: 100%; margin: -20rpx auto;">
                    <!-- 使用v-for来遍历aiqingList数组 -->
                    <view v-for="(aiqing, tuijindex) in aiqingList"
                          style="width: 30.5%; margin: 10rpx; box-sizing: border-box; display: flex; flex-direction: column;"
                          @click="jumpPage(aiqing.id)">
                        <image
                                style="height: 330rpx; width: 100%; border-radius: 10rpx;"
                                :src="aiqing.filmImg">
                        </image>
                        <view class="view-style">{{aiqing.filmGoLive == 0 ? '热播' : aiqing.filmGoLive == 1 ? '预播' : '云首播'}}</view>
                        <view style="text-align: center; margin-top: 10rpx; font-weight: bold; letter-spacing: 2rpx; font-size: 32rpx;">{{aiqing.filmName}}</view>
                    </view>
                </view>
            </view>
        </view>
      </view>
  </view>
</template>

设置无背景色

在需要设置view的代码块中添加css样式

background-color:transparent;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值