Commit 69ef975a by 李伟康

修改滚动样式

1 parent a72668cf
<template>
<div class="group-list">
<div class="group-list" ref="groupBox">
<div class="mask"></div>
<template v-if="list.length">
<div
......@@ -43,16 +43,17 @@ export default {
setList (list) {
this.list = list
this.$nextTick(() => {
let boxHeight = this.$refs.groupBox
let [item] = document.getElementsByClassName('group-item')
let itemHeight = item.offsetHeight / 7 + item.offsetHeight
let groupHeight = `${itemHeight * (list.length - 7)}`
let groupHeight = `${itemHeight * (list.length)}`
let rule = `@keyframes rowup {
0% {transform: translateY(0);}
0% {transform: translateY(${boxHeight.offsetHeight}px);}
100% {transform: translateY(-${groupHeight}px);}
}`
let sheet = document.styleSheets[0]
sheet.insertRule(rule, 0)
let speed = 2 * list.length
let speed = 2 * list.length + 14
// linear
this.$refs.move.style.animation = `${speed}s rowup linear infinite normal`
// this.move()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!