<template><view class="content"><view class="model_box"><view class="model_title">推广营销</view><view class="model_scrollx flex_row"><scroll-view class="uni-swiper-tab" scroll-x :style="'height:'+scrollH+'px'"><view class="scrollx_items tg_zdtg"><image src="/static/my/icon_tg1.png" mode=""></image><view class="tgyx_title">置顶推广</view><view class="tgyx_desc">搜索页最强特权</view></view><view class="scrollx_items tg_hot"><image src="/static/my/icon_tg2.png" mode=""></image><view class="tgyx_title">我要上热门</view><view class="tgyx_desc">多十倍商机</view></view><view class="scrollx_items tg_zshy"><image src="/static/my/icon_tg3.png" mode=""></image><view class="tgyx_title">钻石会员</view><view class="tgyx_desc">抢占无限商机</view></view><view class="scrollx_items tg_hjhy"><image src="/static/my/icon_tg4.png" mode=""></image><view class="tgyx_title">黄金会员</view><view class="tgyx_desc">提供供应排名</view></view></scroll-view></view></view></view>
</template>
<script>export default {data() {return {scrollH: 130}},onLoad() {uni.getSystemInfo({success: function(res) { // res - 各种参数let info = uni.createSelectorQuery().select(".scrollx_items");info.boundingClientRect(function(data) { //data - 各种参数console.log(data.height)  // 获取元素宽度this.scrollH = data.height}).exec()}});},onShow() {},methods: {}}
</script><style>/* 左右滑动 */.uni-swiper-tab{white-space: nowrap;}.model_scrollx{justify-content: space-between;padding: 40rpx 0;}.scrollx_items{padding: 30rpx 20rpx;text-align: center;display: inline-block;width: 210rpx;box-sizing: border-box;margin-left: 30rpx;}.scrollx_items:last-child{margin-right: 30rpx;}.scrollx_items image{width: 70rpx;height: 66rpx;}.tgyx_title{font-size: 28rpx;color: #333333;margin-top: 30rpx;}.tgyx_desc{font-size: 24rpx;margin-top: 10rpx;}.tg_zdtg{background: linear-gradient(bottom right, #d5e4fa, #dae7fb);color: #477cd3;}.tg_hot{background: linear-gradient(bottom right, #fffcec, #fbf6d9);color: #ffa800;}.tg_zshy{background: linear-gradient(bottom right, #fdf7fe, #f9e5fe);color: #c559de;}.tg_hjhy{background: linear-gradient(bottom right, #fff8f0, #fff0df);color: #f3791f;}</style>

uniapp实现左右滑动相关推荐

  1. 便利贴--25{uniapp移动端滑动模块-因为uniapp打包后没有window,所以要另外去做监听和触控事件的传递}

    便利贴--25{uniapp移动端滑动模块-因为uniapp打包后没有window,所以要另外去做监听和触控事件的传递} 效果![请添加图片描述](https://img-blog.csdnimg.c ...

  2. uniapp实现可滑动顶部选项卡

    uniapp实现可滑动顶部选项卡 利用<scroll-view>和<swiper>实现可滑动顶部选项卡,实现效果类似下图: 这里,简单模拟一下,实现一个大致效果 一.构建顶部t ...

  3. uniapp实现左右滑动效果

    uniapp实现左右滑动效果 代码展示: <template><view class="container999" @click="conClick&q ...

  4. uni-app 手指左右滑动实现翻页效果

    首先给页面添加 touch 事件 <view class="text-area" @touchstart="start" @touchend=" ...

  5. uni-app双排一起滑动--两行同步滑动

    效果如下所示,就是两行列表同步滑动: 这个横向滚动肯定还是用scroll-view组件,重要的是里面item样式排列,要用到flex布局: <scroll-view class="na ...

  6. uni-app页面上下滑动关闭(页面回弹问题)

    这个问题很烦,因为上下拉的时候会出现空白页,很难看!我一开始以为是上拉/下拉刷新没关,但后面试了很多方法都没用,查看官方文档的时候很诡异,在app-plus下有一个回弹属性,将它改为false,页面就 ...

  7. uni-app 蒙板滑动/滚动问题//双滑动

    由于开发的是小说阅读器,蒙板之上需要有章节列表,如图 发现在蒙版上滑动时,下方正文区域也有时候会滑动,目录滑动到底/顶部时,再滑动就是下方正文滑动了, 网上找了很久办法,都没有相应解决,调试了很久,终 ...

  8. 【2022-8-4】uniapp 禁止用户滑动除了某个盒子以外的任意元素

    禁止用户滑动除了这个盒子的任意元素 <view class="text_ComHeight" @touchmove.stop.prevent="moveHandle ...

  9. uni-app实现可滑动日历

    效果: uni-calendar.vue <template><view class="uni-calendar"><view v-if=" ...

最新文章

  1. 借助队列解决Josephus问题
  2. InnoDB redo log格式-物理log
  3. matlab用于系统框图建模的函数,MATLAB产品家族中文
  4. leetcode算法题--删除一次得到子数组最大和★
  5. php mysql 非扫描,PHP的中使用非缓冲模式查询数据库的方法
  6. 面试总结-腾讯产品群面
  7. 10.14.1-linux设置时间等
  8. 【汇编优化】之x86架构intrinsic优化
  9. 【Android Developers Training】 20. 创建一个Fragment
  10. [MetalKit]47-Introducing Metal 3 Metal 3简介
  11. oracle rownum的使用
  12. Python调用海康SDK对接摄像机
  13. sql面试题:问题1:查询每个同学的学生编号、学生姓名、选课总数...问题2:查询“张三”老师所授课程的学生中,成绩最高的学生信息...
  14. Python小数整数输出
  15. 【解读】阿里巴巴 MySQL 数据库规约
  16. 中考落幕|教育部:力争到2022年全面实行美育中考,美育到底考什么?
  17. 大疆FPGA/芯片开发工程师(A卷、B卷)笔试题详解
  18. NBMA网络中的OSPF实验(MGRE)
  19. 加加米-又一网络营销中的异军突起!新生的尖锐之师
  20. ubuntu中安装比较工具meld及其使用

热门文章

  1. 联想计算机不能进入系统桌面,win10电脑开机后进不了系统桌面只有联想logo
  2. arcgis 圈选获取图层下点位_关于Arcgis这62个常用技巧,你造吗
  3. 含并行连结的网络 GoogLeNet / Inception V3 动手学深度学习v2 pytorch
  4. Zend Studio 9.0.3正式版注册破解
  5. 分享即时通讯开发之实时音视频技术基础知识
  6. Simulink基础:基本模块操作2(Gain模块与积分模块)
  7. 变焦 焦距 等效焦距
  8. 计算机高级语言的优点,计算机语言|机器、汇编、高级语言联系及优缺点
  9. 梁宁-产品思维-笔记
  10. 电脑怎么查看蓝牙版本