为什么overflow:hidden 去掉以后页码圆点才显示???

来源:7-4 Vue项目首页 - 首页轮播图

ZPF_NEXT

2020-06-03

<template>
<div class="wrapper">
  <swiper :options="swiperOption">
    <swiper-slide>
<img class="swiper-img" src="//img1.qunarzz.com/sight/source/1811/52/b6776b49d27025.jpg_r_640x214_35ae205c.jpg"/>
    </swiper-slide>
    <swiper-slide>
<img class="swiper-img" src="//img1.qunarzz.com/sight/source/1505/4e/3e87ee62e59cdb.jpg_r_640x214_fe6cc902.jpg"/>
    </swiper-slide>
    <swiper-slide>
<img class="swiper-img" src="//img1.qunarzz.com/sight/source/1505/c1/1178c5696fcf57.jpg_r_640x214_a69542c6.jpg" />
    </swiper-slide>
    <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
</div>
</template>

<script>
export default {
name: 'HomeSwiper',
data () {
return {
swiperOption: {
pagination: '.swiper-pagination'
}
}
}
}
</script>

<style scoped>
.wrapper >>> .swiper-pagination-bullet-active
background: red 
.wrapper
// overflow:hidden
width:100%
height:0
padding-bottom: 31.25%
background: #eee
.swiper-img
width: 100%
</style>


写回答

1回答

慕梦前来

2020-06-07

因为overflow:hidden是超出隐藏的,圆点正好在外面那就是隐藏的,去掉了,那超出的这个圆点就显现了呀

0
0

Vue2.5-2.6-3.0开发去哪儿网App 零基础入门到实战

课程紧跟Vue3版本迭代,企业主流版本Vue2+Vue3全掌握

10733 学习 · 8206 问题

查看课程