当前位置:网站首页>swiper 横向轮播 grid
swiper 横向轮播 grid
2022-06-13 01:56:00 【小四是个处女座】
要注意 版本问题
package.js
"swiper": "^6.3.5",
"vue-awesome-swiper": "^3.1.3",
mai.js
import VueAwesomeSwiper from 'vue-awesome-swiper'
// import style (>= Swiper 6.x)
import 'swiper/swiper-bundle.css'
Vue.use(VueAwesomeSwiper, /* { default options with global component } */)
vue 文件
<template>
<div class="teacherR">
<swiper :options="swiperOptions">
<swiper-slide v-for="(item, index) in teacherData"
:key="index">
<ul @click="teacherCourseFn(item)">
<p>
<img :src="item.avatar" />
</p>
<div>
<h4>{
{ item.realName }}</h4>
<li>{
{ item.brief }}</li>
<span @click="teacherCourseFn(item)">查看课程</span>
</div>
</ul></swiper-slide>
</swiper>
</div>
</template>
<script>
// import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/swiper-bundle.css";
import { teacherApi } from "@/api/study/resources.js";
export default {
data() {
return {
swiperOptions: {
slidesPerView: 4, //显示个数
direction: "horizontal",
loop: true,
autoplay: true,
delay: 300,
},
};
},
methods: {
},
};
</script>
<style scoped lang="less">
@import "/swiper/swiper-bundle.css";
.swiper-container {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
// height: 200px;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
</style>

边栏推荐
- [the third day of actual combat of smart lock project based on stm32f401ret6 in 10 days] communication foundation and understanding serial port
- 6、 Implementation of warehouse out management function
- Installing pytorch geometric
- TensorFlow 2. X multi graphics card distributed training
- Qt实现思维导图功能(二)
- 机器学习基础 SVM(支持向量机)
- 谷歌的智能出价有几种?
- Calculation of accuracy, recall rate, F1 value and accuracy rate of pytorch prediction results (simple implementation)
- 回顾ITIL各版本历程,找到企业运维发展的关键点
- 谷歌加大型文字广告是什么?怎么用?
猜你喜欢

Magics 23.0如何激活和使用视图工具页的切片预览功能

华为设备配置双反射器优化虚拟专用网骨干层

Ten thousand words make it clear that synchronized and reentrantlock implement locks in concurrency

How does Google's audience work?

Numpy multidimensional array transpose transpose

Learning notes 51 single chip microcomputer keyboard (non coding keyboard and coding keyboard, scanning mode of non coding keyboard, independent keyboard, matrix keyboard)

Alertwindowmanager pop up prompt window help (Part 1)

5、 Improvement of inventory query function

移动IPv6光猫登录的一般ip地址账号与密码,移动光猫变桥接模式

DFS and BFS to solve Treasure Island exploration
随机推荐
兴趣相似的受众群体
C语言压缩字符串保存到二进制文件,从二进制文件读取压缩字符串后解压。
Introduction to ROS runtime
Vscode configuration header file -- Take opencv and its own header file as an example
csdn涨薪技术之Jmeter接口测试数据库断言的实现与设计
关于tkinter.Canvas 不显示图片的问题
30: Kakfa simulates JSON data generation and transmission
10 days based on stm32f401ret6 smart lock project practice day 1 (environment construction and new construction)
Devaxpress Chinese description --tcxpropertiesstore (property store recovery control)
Padavan mounts SMB sharing and compiles ffmpeg
Delphi implements adding a column of serial number to the CXGRID list
[printf function and scanf function] (learning note 5 -- standard i/o function)
3、 Upload fabric photos to SQL server and provide name to display fabric photos
[MySQL password management] - [administrator password known, unknown (forgotten), cracked]
A DPU architecture without CPU: Hyperion
华为设备配置双反射器优化虚拟专用网骨干层
万字讲清 synchronized 和 ReentrantLock 实现并发中的锁
什么是立体角
谷歌的智能出价有几种?
Devaxpress Chinese description --tdximageslider (picture rotation control)