css 设置无背景色

问题描述

大家好!我是夏小花,今天是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;

相关推荐

  1. css 设置背景

    2024-04-23 16:24:02       28 阅读
  2. css 实现背景图和背景正片叠底

    2024-04-23 16:24:02       30 阅读
  3. Qt之设置QLabel的背景和前景色

    2024-04-23 16:24:02       55 阅读
  4. OSG设置场景背景和窗口大小

    2024-04-23 16:24:02       46 阅读
  5. QToolTip设置背景没有生效原因与解决方法

    2024-04-23 16:24:02       36 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-23 16:24:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-23 16:24:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-23 16:24:02       87 阅读
  4. Python语言-面向对象

    2024-04-23 16:24:02       96 阅读

热门阅读

  1. C++循环结构案例 水仙花数

    2024-04-23 16:24:02       33 阅读
  2. 面试经典-Redis数据库的数据倾斜

    2024-04-23 16:24:02       30 阅读
  3. mysql面试题四(事务)

    2024-04-23 16:24:02       33 阅读
  4. 两套数据库共享存储传递数据

    2024-04-23 16:24:02       25 阅读
  5. 【算法模板】图论基础算法

    2024-04-23 16:24:02       34 阅读
  6. Uni-App 生命周期

    2024-04-23 16:24:02       32 阅读
  7. Vue 动态加载全局样式css(切换ui主题方案)

    2024-04-23 16:24:02       39 阅读
  8. jupyter notebook用不了multiporcessing的问题

    2024-04-23 16:24:02       29 阅读
  9. Centos 7 安装 RocketMQ 5.14(保姆级)

    2024-04-23 16:24:02       34 阅读
  10. 鼠标手辅助器

    2024-04-23 16:24:02       35 阅读