APlayer icon indicating copy to clipboard operation
APlayer copied to clipboard

在类aplayer-lrc-contents中translateY歌词的移动距离只能是16px??

Open wlinglinux opened this issue 4 years ago • 2 comments

中文用户请注意:请尽量用英文描述你的 issue,这样能够让尽可能多的人帮到你。

If you want to report a bug, please provide the following information:

  • The steps to reproduce.
  • A minimal demo of the problem via https://jsfiddle.net or http://codepen.io/pen if possible.
  • Which versions of APlayer, and which browser / OS are affected by this issue?

wlinglinux avatar Mar 10 '21 08:03 wlinglinux

我试着修改文本的行高和高度,歌词的移动不会随着变化。

wlinglinux avatar Mar 10 '21 08:03 wlinglinux

源码:

this.container.style.transform = translateY(${-this.index * 16}px);

从源码上看确实是只能移动16px,可以考虑添加一个设置参数,用来指定单行行高(如果可以的话可以自己打包一下

Eling486 avatar Apr 05 '21 08:04 Eling486