为什么我怎么调都有那白框啊

来源:9-2 Vue项目详情页 - 公用图片画廊组件拆分

慕勒2048820

2019-03-03

图片描述

<template>
  <div class="container">
    <div class="wrapper">
      <swiper :options="swiperOption">
        <swiper-slide >
          <img class="swiper-img" src='//img1.qunarzz.com/sight/p0/1807/7d/7d64de6b134d10eaa3.img.jpg_600x330_0297e8aa.jpg'  />
        </swiper-slide>
        <div class="swiper-pagination"  slot="pagination"></div> 
     </swiper>
    </div>
  </div>
</template>

<script>
export default {
   name: 'CommonGallary'
}
</script>

<style lang="stylus" scoped>
    .container
      display: flex
      flex-direction: column
      justify-content: center
      z-index: 99
      position: fixed
      left: 0
      right: 0
      top: 0
      bottom: 0
      background: #000
      .wrapper
        overflow: hidden
        height: 0
        width: 100%
        padding-bottom: 88%
        background: #fff
        .swiper-img
          width: 100%
</style>

写回答

1回答

Dell

2019-03-03

你看看你这张图,是不是底下就是白色的

0
3
Dell
回复
慕勒2048820
88%太高了,改成正常的长宽比
2019-03-04
共3条回复

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

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

10717 学习 · 8204 问题

查看课程