本教程操作环境:windows7系统、uni-app2.5.1版本,Dell G3电脑。
推荐(免费):uni-app教程
uni-app在手机上背景图片不显示?
uni-app解决无法加载本地图片的方法【动态加载背景图片*唯一的解决办法】
特别注意:千万别忘记了【`url(${indexBackgroundImage})`】
<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设置内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复