使用swiper轮播显示多张图片

使用swiper轮播显示多张图片效果如下 css 样式 需要引入 swiper 的 css 和 js 文件 linkrel stylesheet href static swiper css swiper min css scriptsrc static swiper js swiper min js ying sipder s scriptsrc linkrel stylesheet href

效果如下:

使用swiper轮播显示多张图片

css样式, 需要引入swiper的css和js文件

    

.ying_sipder .swiper-container { margin-top: 50px; width: 100%; height: 300px; } .ying_sipder .swiper-container .swiper-wrapper .swiper-slide { width: 250px; border-radius: 20px; } .ying_sipder .swiper-container .swiper-wrapper .swiper-slide img { position: absolute; left: 120px; width: 100%; height: 250px; } .ying_sipder .swiper-container .swiper-wrapper .swiper-slide-prev { height: 250px !important; } .ying_sipder .swiper-container .swiper-wrapper .swiper-slide-prev img { height: 250px !important; } .ying_sipder .swiper-container .swiper-wrapper .swiper-slide-next { height: 250px !important; } .ying_sipder .swiper-container .swiper-wrapper .swiper-slide-next img { height: 250px !important; } .ying_sipder .swiper-container .swiper-wrapper .swiper-slide-active { width: 250px; }

html代码

 
  
使用swiper轮播显示多张图片
使用swiper轮播显示多张图片
使用swiper轮播显示多张图片
使用swiper轮播显示多张图片

js

new Swiper("#ying_sipder", { direction: 'horizontal', //默认horizontal, 水平轮播 autoplay: true, //自动切换 loop: true, //循环 slidesPerView: "auto", //默认1, 同时显示的slides数量,auto 代表根据轮播图的宽度排列 spaceBetween: 30, //轮播图之间的间距 })

代码

可以关注我的公众号:技术趣谈

使用swiper轮播显示多张图片

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/228109.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月16日 下午7:48
下一篇 2026年3月16日 下午7:48


相关推荐

  • c语言ascii码表查询,ascii码表查询_ascii码表怎么看

    c语言ascii码表查询,ascii码表查询_ascii码表怎么看ASCII AmericanStan 美国信息交换标准代码 是基于拉丁字母的一套电脑编码系统 主要用于显示现代英语和其他西欧语言 它是现今最通用的单字节编码系统 并等同于国际标准 ISO IEC646 1 请注意 ASCII 是 AmericanStan

    2026年3月17日
    2
  • 迪奥布兰度正在挑战fgo 小说_god eater resurrection

    迪奥布兰度正在挑战fgo 小说_god eater resurrectiongodis之aof持久化文章目录godis之aof持久化基本说明文件写入加载文件文件重写数据转化为redis命令外部调用基本说明在godis中,只有aof持久化,而没有rdb持久化。aof持久化分为三个基本的模块:将命令持久化到aof文件将aof文件的命令加载到内存aof文件重写文件写入handlerAof函数的作用是将命令持久化到aof文件中。它监听着aof通道并写入到aof文件,在初始化handler的时候,就开启一个子goroutine来执行这个函数。//监听aof通

    2022年10月8日
    4
  • linux更新python版本命令_Linux升级python版本

    linux更新python版本命令_Linux升级python版本下载需要升级的 python 版本 如 wgethttps www python org ftp python 3 7 0 Python 3 7 0 tgz 安装需要的环境组件 yum yinstallread develsqlite develbzip2 devel i686openssl devel i686gdbm devel i686libdbi devel i686

    2026年3月18日
    2
  • 广东省-IT红黑榜排名公司名称

    广东省-IT红黑榜排名公司名称

    2021年12月17日
    66
  • PHP实现对短信验证码发送次数的限制

    PHP实现对短信验证码发送次数的限制

    2021年11月3日
    67
  • HashMap之TreeNode

    HashMap之TreeNodeHashMap 之 TreeNode 简述在分析 HashMap 之前先说一下内部类 TreeNode TreeNode 类是一颗红黑树的各种操作 当然 TreeNode 不只是简单的红黑树操作 还有与 HashMap 业务相关的代码先看一下类的继承关系 Entry 是一个接口 主要有一些让子类去实现的 get set 方法 Node 是一个单向链表最后就是 TreeNode 红黑树了先看一下简单的 Node 单向链表

    2026年3月19日
    1

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号