当前位置:网站首页>swiper 一侧或两侧露出一小部分
swiper 一侧或两侧露出一小部分
2022-07-25 14:00:00 【牧羊狼的狼】
效果如下:

首先引入 swiper 库:(附带其他库,根据实际情况自行选择)
$cssList = array(implode(",", array(
'//static2.51fanli.net/static/?f=webapp/css/base.css',
'common/libs/vant/index.css',
'common/libs/fmu/js/vendors/swiper/5.3.8/swiper.min.css',
'huodong/activity88904/css/index.css'
))
);
$jsList = array(implode(",", array(
'//static2.51fanli.net/static/?f=webapp/js/base.js',
'common/js/fanli/trace/ubt.js',
"common/libs/fmu/js/vendors/swiper/5.3.8/swiper.js",
'webapp/js/common/hybridapi/nativefunction_v2.js',
"common/libs/vmu/core/jquery.extend.js",
'common/libs/vant/index.js',
'common/libs/vmu/navtomini/1.0.0/nav-to-mini.vue.js',
'huodong/activity88904/js/index.js'
))
);html:
<div id="J_swipe_container" class="banner swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide J_swipe_slide" v-for="(item, index) in bannerList" :key="index">
<img :src="item.img" alt="" @click="handleBannerClick(item.link)">
</div>
</div>
<div class="swiper-pagination"></div>
</div>css:
.swiper-container {
height: 3.34rem !important;
}
.swiper-slide{
width: 6.7rem!important;
margin: 0 0.2rem;
}
.swiper-slide-next{
left: -0.2rem;
}js:
setTimeout(function () {
new Swiper('#J_swipe_container', {
loop: true,
slidesPerView: 'auto', // 默认一个屏幕显示几张图,必须auto!
autoHeight: true,
autoplay: {
delay: 3000,
disableOnInteraction: true,
},
})
}, 500)边栏推荐
- Common problems of wireless relay acquisition instrument
- Acquisition data transmission mode and online monitoring system of wireless acquisition instrument for vibrating wire sensor of engineering instrument
- word设置粘贴仅保留文本
- Mlops column introduction
- leetcode1 --两数之和
- The practice of depth estimation self-monitoring model monodepth2 in its own data set -- single card / multi card training, reasoning, onnx transformation and quantitative index evaluation
- wangeditor 富文本编辑器
- Esp32 connects to Alibaba cloud mqtt IOT platform
- Four methods of importing CSV text files into Excel
- Vscode plug-in development
猜你喜欢

Hyperautomation for the enhancement of automation in industries
![[configure hifive1 revb] the device manager does not recognize the port, and can not connect to j-link via USB](/img/55/a8acdd63a17bf9e3072c9a04babe79.png)
[configure hifive1 revb] the device manager does not recognize the port, and can not connect to j-link via USB
![[server data recovery] HP EVA server storage raid information power loss data recovery](/img/ee/8f36ef1b5842f1778c0dd695401b40.jpg)
[server data recovery] HP EVA server storage raid information power loss data recovery

职场「数字人」不吃不睡007工作制,你「卷」得过它们吗?

redis集群的三种方式

手把手教学Yolov7的搭建及实践

Esp32 connects to Alibaba cloud mqtt IOT platform

Applet enterprise red envelope function

What problems should SEOER pay attention to when baidu searches and attacks pirated websites?

Alibaba mqtt IOT platform "cloud product circulation" practice - the two esp32 achieve remote interoperability through the IOT platform
随机推荐
移动端网站,独立APP,网站排名策略有哪些?
Serious [main] org.apache.catalina.util.lifecyclebase Handlesubclassexception initialization component
Data analysis business core
CDA level1 multi topic selection
2271. Maximum number of white bricks covered by blanket ●●
数字孪生 - 认知篇
From Anaconda to tensorflow to jupyter, step on the pit and fill it all the way
新唐NUC980设置DHCP或者静态IP
Applet enterprise red envelope function
2271. 毯子覆盖的最多白色砖块数 ●●
飞盘局有多快乐?2022年轻人新潮运动报告
einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,
Preparing for the soft test for junior programmers in the second half of 2022
[server data recovery] HP EVA server storage raid information power loss data recovery
命名空间与库
GCD details
Brush questions - Luogu -p1161 turn on the light
Dr. Berkeley's "machine learning engineering" big truth; AI vice president '2022 ml job market' analysis; Large list of semiconductor start-ups; Large scale video face attribute data set; Cutting edge
Brush questions - Luogu -p1146 coin flip
Vscode plug-in development