当前位置:网站首页>uniapp设置背景图效果demo(整理)
uniapp设置背景图效果demo(整理)
2022-07-06 14:55:00 【我是开心呀】
设置背景图有时候会报错-用行内解决
<template>
<view class="bg align-center" :style="{backgroundImage: 'url(' + imgSrc.src+ ')'}">立即购买</view>
</template>
<script>
export default {
data(){
return{
imgSrc:{
src: '../../static/home/lists.svg', //图片路径
}
}
}
}
</script>
<style>
.bg {
background-size: 100% 100%;
}
</style>
边栏推荐
- 3DMax指定面贴图
- Build op-tee development environment based on qemuv8
- 柔性数组到底如何使用呢?
- extern关键字
- Seata聚合 AT、TCC、SAGA 、 XA事务模式打造一站式的分布式事务解决方案
- Data processing skills (7): MATLAB reads the data in the text file TXT with mixed digital strings
- 软考高级(信息系统项目管理师)高频考点:项目质量管理
- return 关键字
- Leetcode question brushing (XI) -- sequential questions brushing 51 to 55
- (18) LCD1602 experiment
猜你喜欢
Should novice programmers memorize code?
Management background --2 Classification list
Common sense: what is "preservation" in insurance?
Attack and defense world ditf Misc
每日一题:力扣:225:用队列实现栈
网络基础入门理解
将MySQL的表数据纯净方式导出
Data processing skills (7): MATLAB reads the data in the text file TXT with mixed digital strings
Management background --1 Create classification
Build op-tee development environment based on qemuv8
随机推荐
Barcodex (ActiveX print control) v5.3.0.80 free version
SQL server generates auto increment sequence number
在IPv6中 链路本地地址的优势
3DMax指定面贴图
void关键字
3DMAX assign face map
Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
China 1,4-cyclohexanedimethanol (CHDM) industry research and investment decision-making report (2022 Edition)
MySQL数据库基本操作-DML
Chapter 3: detailed explanation of class loading process (class life cycle)
Build op-tee development environment based on qemuv8
【数字IC手撕代码】Verilog无毛刺时钟切换电路|题目|原理|设计|仿真
Seata aggregates at, TCC, Saga and XA transaction modes to create a one-stop distributed transaction solution
NPDP certification | how do product managers communicate across functions / teams?
二分图判定
AdaViT——自适应选择计算结构的动态网络
Installation and use of labelimg
重磅新闻 | Softing FG-200获得中国3C防爆认证 为客户现场测试提供安全保障
手写ABA遇到的坑
0 basic learning C language - digital tube