进度条没有颜色变化可能是哪里出了问题?

来源:3-11 阅读进度功能实现

Zoey_Zhang

2018-10-17 09:28

看了几遍代码没有问题呀

写回答 关注

3回答

  • Sam
    2018-10-17 10:56:40

    你好,能提供一下源码吗?初步判断是backgroundSize属性设置的问题

  • Zoey_Zhang
    2018-10-24 14:55:15

    .setting-progress {

          position: relative;

          width: 100%;

          height: 100%;

          .progress-wrapper {

            width: 100%;

            height: 100%;

            @include center;

            padding: 0 px2rem(30);

            box-sizing: border-box;

            .progress {

              width: 100%;

              // 覆盖默认样式

              -webkit-appearance: none;

              height: px2rem(2);

              background: -webkit-linear-gradient(#999, #999) no-repeat, #ddd;

              background-size: 0 100%;

              &:focus {

                outline: none;

              }

              // 进度条的手柄

              &::-webkit-slider-thumb {

                -webkit-appearance: none;

                height: px2rem(20);

                width: px2rem(20);

                border-radius: 50%;

                background: white;

                box-shadow: 0 4px 4px 0 rgba(0, 0, 0, .15);

                border: px2rem(1) solid #ddd;

              }

            }

          }

  • Zoey_Zhang
    2018-10-24 14:51:04

    onProgressInput(progress) {

          this.progress = progress

          this.$refs.progress.style.backgroundSize = '${this.progress}% 100%'

        },

    Zoey_Z... 回复里德曼长着驴...

    3q 学到了

    2018-10-25 09:41:59

    共 3 条回复 >

快速入门Web阅读器开发

带你了解电子书阅读器的工作原理,通过Vue.js快速实现Web阅读器

26242 学习 · 214 问题

查看课程

相似问题