当前位置: 首页 > news >正文

手机价格网站建设网站优化培训学校

手机价格网站建设,网站优化培训学校,web前端视频教程全套,比较有名的编程培训机构如果想给uniapp的页面加背景图片的话,疯狂度了之后会发现uniapp中背景图片用本地图片不起效果,所以一般用网络路径,之后又会发现,页面如果直接加背景的话有可能会遇到页面内容不够,背景撑不满整个页面,如果…

如果想给uniapp的页面加背景图片的话,疯狂度了之后会发现uniapp中背景图片用本地图片不起效果,所以一般用网络路径,之后又会发现,页面如果直接加背景的话有可能会遇到页面内容不够,背景撑不满整个页面,如果给页面根元素加 height: 100vh;的话页面上的东西就没法滚动了,所以最好是结合scroll-view一起做。

pages.json中:

		{"path": "pages/hotelInfo/hotelInfo","style": {"navigationStyle": "custom",	//自定义导航栏"enablePullDownRefresh": false,	//关闭页面下拉刷新"disableScroll": true			//不允许页面滑动}}

页面:

<template><view class="ye"><scroll-view scroll-y="true" class="scrollView" @scroll="scroll"><view class="fanhui" :class="{isNavbar : isNavbar}":style="{paddingTop:paddingTop + 'px',height:height + 'px'}"><view class="content"><uni-icons :size="height * 0.8 + 'px'" color="#000000" type="back" @click="goBack()"></uni-icons><view class="title">页面标题</view></view></view><view class="contentC"></view></scroll-view></view>
</template><script>export default {data() {return {height: 0,paddingTop: 0,isNavbar: false,};},onLoad(query) {//设置导航条参数let menuButtonInfo = uni.getMenuButtonBoundingClientRect();this.paddingTop = menuButtonInfo.top;this.height = menuButtonInfo.height;},methods: {goBack() {// uni.navigateBack()uni.reLaunch({url: "/pages/home/home"})},scroll(e){console.log(e)const scrollTop = e.detail.scrollTop;// 导航条颜色透明渐变if (scrollTop <= 50) {this.isNavbar = false} else {this.isNavbar = true}}}};
</script><style lang="scss">.ye {height: 100vh;@keyframes backgroundColorAnimation {0% {background-color: transparent;}100% {background-color: #fef2e9;}}.isNavbar {background-color: #fef2e9;animation: backgroundColorAnimation 0.5s;}.fanhui {z-index: 9;width: 100%;color: #100F0F;position: fixed;.content {width: 94%;height: 100%;margin: 0 auto;display: flex;align-items: center;.title {font-weight: 500;font-size: 32rpx;left: 50%;position: absolute;transform: translateX(-50%);}}}.scrollView {width: 100%;height: 100%;background-image: url("https://cdn.15803565366.com/uniapp/bg.png");background-repeat: no-repeat;background-size: cover;}.contentC{padding: 26rpx;box-sizing: border-box;}}
</style>
http://www.ritt.cn/news/4607.html

相关文章:

  • linux系统服务器怎么做网站长沙网络营销公司排名
  • 百度搜索网站排名服务网站推广方案
  • 好的建站网站seo查询软件
  • 曲靖手机网站建设费用南宁哪里有seo推广厂家
  • 织梦移动网站后缀营销型网站建设的价格
  • 做销售的去哪个网站应聘优化工具箱下载
  • wordpress文章设置到导航栏上海网站排名优化
  • 网络推广网站怎么做做seo网页价格
  • jsp如何做动态网站陕西seo排名
  • 网站客服系统怎么添加深圳优化公司义高粱seo
  • 做店标 做店招的网站经典软文推广案例
  • 旅游的网站怎么做微信软文推广怎么做
  • 用阿里云做网站会不会被黑安新seo优化排名网站
  • 金蝶软件收费价目表深圳网站seo哪家快
  • 网站开发分为几个方向html做一个简单的网页
  • 怎么看网站域名百度旗下13个app
  • 手机软件做的相册怎样传到网站青岛网站seo公司
  • 营销网站建设定制营销推广的主要方式
  • 百度做的网站迁移百度站长平台网址
  • 北京网站建设制作案例怎么开通网站
  • 国外域名查询网站优化推广网站淄博
  • 北京做网站公司哪家强影视后期培训班一般要多少钱
  • 网站域名的分类开网店3个月来亏了10万
  • 个人做盈利网站竞价托管多少钱
  • 做电影网站危险吗谷歌seo优化中文章
  • 汽车网站页面seoul
  • 西部数码空间可以做会所网站吗如何制作一个自己的网页网站
  • 廊坊cms模板建站微软bing搜索引擎
  • 做网站靠什么收入百度app优化
  • 阿里云做淘宝客网站吗北京本地网络推广平台