vue怎么实现【音频播放器】?css可根据自己的需求调整

 

我这里采用的是音频插件,然后修改的样式的方式:

首先安装 音频插件

npm install --save vue-aplayer

html:然后引入插件使用

 

 css:

<style lang='scss' scoped>

/deep/.aplayer{

  box-shadow: inherit;

  background-color: #F7F7F7;

  border-radius: 10px;

  width: 100%;

  .aplayer-body{

    .aplayer-pic{

      background-image: inherit;

      background:rgba(3, 186, 130,0.3);

      border-radius: 10px;

      .aplayer-button{

        background:#03BA82;

        border: 0;

        width: 40px;

        height: 40px;

        opacity: inherit;

      }

      .aplayer-pause{

        right: 25px;

        bottom: 25px;

        .aplayer-icon-pause{

          width: 25px;

          height: 25px;

          left: 7px;

          top: 7.3px;

        }

      }

      .aplayer-play{

        .aplayer-icon-play{

          width: 30px;

          height: 30px;

          left: 6px;

          top: 5px;

        }

      }

    }

    .aplayer-info{

      padding:15px 30px;

      padding-left: 15px;

      .aplayer-music{

        .aplayer-title{

          color: #999;

          font-size: 20px;

        }

        .aplayer-author{

          display: none;

        }

      }

      .aplayer-controller{

        .aplayer-bar-wrap{

          .aplayer-bar{

            height: 8px;

            border-radius: 4px;

            background: #eee;

            .aplayer-loaded{

              height: 8px;

              border-radius: 4px;

              background: #eee;

            }

            .aplayer-played{

              height: 8px;

              border-radius: 4px;

              .aplayer-thumb{

                width: 16px;

                height: 16px;

              }

            }

          }

        }

        .aplayer-time{

          .aplayer-time-inner{

            font-size: 20px;

            color: #333;

          }

        }

        .aplayer-icon{

          display: none;

        }

      }

    }

  }

}

</style>

    希望我的愚见能够帮助你哦~,若有不足之处,还望指出,你们有更好的解决方法,欢迎大家在评论区下方留言支持,大家一起相互学习参考呀~

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值