当前位置:网站首页>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
- MySQL download and installation
- Delphi implements adding a column of serial number to the CXGRID list
- 详细受众特征详细解释
- Plumber game
- 谷歌加大型文字广告是什么?怎么用?
- Devaxpress Chinese description --tcximagelist (enhanced image list control)
- Répertoire d'exclusion du transport rsync
- The scientific innovation board successfully held the meeting, and the IPO of Kuangshi technology ushered in the dawn
- LabVIEW大型项目开发提高质量的工具
猜你喜欢

Detailed understanding of white noise

Introduction to Google unit testing tools GTEST and gmoke

Magics 23.0 how to activate and use the slice preview function of the view tool page
![[the 4th day of the 10 day smart lock project based on stm32f401ret6] what is interrupt, interrupt service function, system tick timer](/img/c4/0d97def5fb587b8301bcb907fc6fcf.jpg)
[the 4th day of the 10 day smart lock project based on stm32f401ret6] what is interrupt, interrupt service function, system tick timer

csdn涨薪技术之Jmeter接口测试数据库断言的实现与设计

What is Google plus large text ads? How to use it?

水管工遊戲

Explanation and application of prefix sum (one-dimensional, two-dimensional)

Machine learning basic SVM (support vector machine)

Workspace for ROS
随机推荐
Top level configuration + cooling black technology + cool appearance, the Red Devils 6S Pro is worthy of the flagship game of the year
The commercial value of Kwai is being seen by more and more brands and businesses
Combining strings and numbers using ssstream
[the second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] (lighting with library function and register respectively)
详细受众特征详细解释
Introduction to Google unit testing tools GTEST and gmoke
Introduction to common ROS commands
(no plug-in) summary of vim basic shortcut keys
Detailed explanation of audience characteristics
Detailed explanation of maxpooling corresponding to conv1d, conv2d and conv3d machines of tensorflow2
numpy多维数组转置transpose
Examples of using the chromium base library
Why is Huawei matebook x Pro 2022 leading a "laptop" revolution
Delphi implements adding a column of serial number to the CXGRID list
Numpy multidimensional array transpose transpose
兴趣相似的受众群体
[soft test] software designer knowledge points sorting (to be updated)
Shell command notes
About tkinter Canvas does not display pictures
Devaxpress Chinese description --tcximagelist (enhanced image list control)