better-scroll插件无法滚动原因排除


链接:https://www.jianshu.com/p/dee1fc22f6cb

 

//vue组件
<template>
  <div class="detail">
    <scroll class="content">
      aaaa
    </scroll>
  </div>
</template>

<script>import scroll from "components/common/scroll";
export default {
  name: "detail",
  data() {
    return {
    };
  },
  components: {
    scroll
  },
  },
  mounted() {},
  methods: {}
};
</script>
<style lang="less" scoped>
.detail {
  height: 100vh;
}

.content {
  height: calc(100% - 44px);//100%是相对于父元素detail的,记得符号左右两边有空格
}
</style>
 

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM