我是靠谱客的博主 包容睫毛,这篇文章主要介绍uniapp设置的背景图无法显示怎么办,现在分享给大家,希望可以做个参考。

本教程操作环境:windows7系统、uni-app2.5.1版本,Dell G3电脑。

推荐(免费):uni-app教程

uni-app在手机上背景图片不显示?

uni-app解决无法加载本地图片的方法【动态加载背景图片*唯一的解决办法】

特别注意:千万别忘记了【`url(${indexBackgroundImage})`】

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<template> <view class="index" :style="{backgroundImage:`url(${indexBackgroundImage})`,backgroundSize: 'cover'}"> <!--你的内容--> </view> </template> <script> import indexBackgroundImage from "@/static/img/account_index.jpg" export default { data() { return { indexBackgroundImage:indexBackgroundImage } }, methods: { } } </script> <style lang="scss" scoped=""> </style>
登录后复制

以上就是uniapp设置的背景图无法显示怎么办的详细内容,更多请关注靠谱客其它相关文章!

最后

以上就是包容睫毛最近收集整理的关于uniapp设置的背景图无法显示怎么办的全部内容,更多相关uniapp设置内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(95)

评论列表共有 0 条评论

立即
投稿
返回
顶部