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

uniapp横屏移动端卡片缩进轮播图

uniapp横屏移动端卡片缩进轮播图

效果:
在这里插入图片描述

代码:

<!-- 简单封装轮播图组件:swiperCard -->
<template><swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="10000" :duration="500"previous-margin="70rpx" next-margin="70rpx" @change="change"><swiper-item v-for="(item, i) in 5" :key="i"><view class="swiper-item uni-bg-red" :class="i === swiperIndex ? 'active' : ''">A</view></swiper-item></swiper>
</template><script>export default {data() {return {swiperIndex: 0}},methods: {change(e) {// console.log(e.target.current);this.swiperIndex = e.target.current;}}}
</script><style lang="scss" scoped>.swiper {height: calc(100vh - 150rpx);width: 100%;.swiper-item {background-color: pink;height: calc(100vh - 200rpx);width: calc(100vw - 180rpx);border-radius: 10rpx;margin-top: 10rpx;}// 轮播图当前激活的样式.active {height: calc(100vh - 170rpx);margin-top: 0rpx;transition: all .2s ease-in 0s;}}
</style>

相关文章:

  • Qt | 2D 时钟设计
  • 基于uniapp(vue3)H5附件上传组件,可限制文件大小
  • Django QuerySet对象,all()方法
  • vue3+vite+nodejs,通过接口的形式请求后端打包(可打包全部或指定打包组件)
  • web的学习和开发
  • 面试专区|【40道移动端测试高频题整理(附答案背诵版)】
  • Android 生成 AAR 包
  • 论文学习_UVSCAN: Detecting Third-Party Component Usage Violations in IoT Firmware
  • 硬件工程师干了一年,公司无效卷,怎么破?
  • 手机数据恢复篇:恢复出厂设置后从iPhone快速恢复数据
  • 【分布式数据仓库Hive】HivQL的使用
  • Git 基础-创建版本库 git init、添加到暂存区git add、查看状态git status、查看改动git diff
  • ESP32-VScode环境设置
  • 无线WiFi毫米波雷达传感器成品,智能照明人体感应开关,飞睿智能点亮智慧生活
  • js学习--制作选项卡
  • 【Under-the-hood-ReactJS-Part0】React源码解读
  • 【干货分享】SpringCloud微服务架构分布式组件如何共享session对象
  • 【跃迁之路】【669天】程序员高效学习方法论探索系列(实验阶段426-2018.12.13)...
  • 2018一半小结一波
  • AHK 中 = 和 == 等比较运算符的用法
  • Angular 响应式表单 基础例子
  • Bootstrap JS插件Alert源码分析
  • jQuery(一)
  • Js基础知识(四) - js运行原理与机制
  • laravel5.5 视图共享数据
  • MySQL几个简单SQL的优化
  • node-sass 安装卡在 node scripts/install.js 解决办法
  • python 装饰器(一)
  • Rancher如何对接Ceph-RBD块存储
  • React-Native - 收藏集 - 掘金
  • SegmentFault 技术周刊 Vol.27 - Git 学习宝典:程序员走江湖必备
  • Vue学习第二天
  • 初识MongoDB分片
  • 从零搭建Koa2 Server
  • 构造函数(constructor)与原型链(prototype)关系
  • 理解在java “”i=i++;”所发生的事情
  • 它承受着该等级不该有的简单, leetcode 564 寻找最近的回文数
  • 小程序 setData 学问多
  • 用Node EJS写一个爬虫脚本每天定时给心爱的她发一封暖心邮件
  • MPAndroidChart 教程:Y轴 YAxis
  • Prometheus VS InfluxDB
  • 完善智慧办公建设,小熊U租获京东数千万元A+轮融资 ...
  • ​io --- 处理流的核心工具​
  • ​RecSys 2022 | 面向人岗匹配的双向选择偏好建模
  • ​ssh-keyscan命令--Linux命令应用大词典729个命令解读
  • ​马来语翻译中文去哪比较好?
  • #pragma pack(1)
  • $.ajax,axios,fetch三种ajax请求的区别
  • (14)目标检测_SSD训练代码基于pytorch搭建代码
  • (3)选择元素——(17)练习(Exercises)
  • (C语言)fread与fwrite详解
  • (Forward) Music Player: From UI Proposal to Code
  • (二十五)admin-boot项目之集成消息队列Rabbitmq
  • (附源码)springboot家庭装修管理系统 毕业设计 613205
  • (三)Kafka 监控之 Streams 监控(Streams Monitoring)和其他