小程序首页轮播图设计

效果图

微信小程序的数据详解

indicator-dots:是否显示面板指示点【默认false 】

indicator-color:指示点颜色【默认rgba(0, 0, 0, .3)】

indicator-active-color:当前选中的指示点颜色【默认#000000】

autoplay:是否自动切换【默认false】

interval:自动切换时间间隔【默认5000】

duration:滑动动画时长【默认500】

circular:是否采用衔接滑动【默认false】

vertical:滑动方向是否为纵向【默认false】

源码如下

index.wxml

html 复制代码
<view class="index-container">
  <view class="index-header">
    <van-search value="{{ searchInfo }}" shape="round" background="#9c7bf0" placeholder="请输入搜索内容" />
    <view class="index-swiper">
      <swiper class="myswiper" indicator-dots="true" indicator-color="#fff" indicator-active-color="#9c7bf0" autoplay="true" interval="5000" duration="500" circular="true">
        <swiper-item>
          <image class="swiper-img" mode="heightFix" src="../../images/swiper/shop1.png"></image>
        </swiper-item>
        <swiper-item>
          <image class="swiper-img" mode="heightFix" src="../../images/swiper/shop2.png"></image>
        </swiper-item>
      </swiper>
    </view>
  </view>
</view>

index.wxss

css 复制代码
.index-header {
  background-image: linear-gradient(to bottom right, rgb(114, 135, 254), rgb(130, 88, 186));
  width: 100%;
  height: 190px;
  border-bottom-left-radius: 100%;
  border-bottom-right-radius: 100%;
}
.index-swiper{
  padding: 10px;
}
.swiper-img {
  height: 140px;
}
相关推荐
派小心.8 小时前
网站统计采样数据的误差核对
大数据·服务器·前端·数据库·人工智能·小程序·数据分析
河北清兮网络科技9 小时前
广告联盟 APP 介绍:搭建属于自己的流量变现平台
小程序·app·产品经理·短剧app·广告联盟
微擎应用市场12 小时前
多功能预约公众号管理系统介绍
微信小程序·小程序
JQweryuiop12 小时前
SaaS商城软件与定制开发该怎么选?推荐七彩屋商城小程序系统
小程序
青企通13 小时前
传统企业数字化转型的技术路径:从需求建模到小程序 MVP 的落地方法
小程序·php·apache
andrsted13 小时前
练题簿助学教学:在线刷题、随堂考试,让一门课拥有自己的题库
学习·微信小程序·小程序·学习方法·刷题
派小心.15 小时前
网站统计多域名数据隔离配置
大数据·数据库·人工智能·小程序·数据分析
2501_9159214315 小时前
iOS应用从开发到上架App Store的完整步骤详解
android·ios·小程序·https·uni-app·iphone·webview
省钱兄--zs1 天前
深圳24小时自助健身房软硬件解决方案实战指南与开发流程详解
java·数据仓库·spring boot·小程序·架构
李洋-蛟龙腾飞公司1 天前
微信小程序商城迁移鸿元服务实战
微信小程序·小程序