setTableScroll: function () {
var outHeight = $('.content_list')[0].offsetHeight;
var contentHeight = $('.content_scroll-height')[0].offsetHeight;
if (contentHeight > outHeight) {
var self = this;
this.JqsbList = this.JqsbList.concat(this.JqsbList);
setTimeout(function () {
self.scrollContentDom = document
.getElementsByClassName('content_list')
.item(0);
self.tableDom = document
.getElementsByClassName('content_scroll-height')
.item(0);
self.roll(50);
}, 10);
}
},
roll: function (t) {
var self = this;
var timer = setInterval(this.rollStart, t);
self.tableDom.onmouseover = function () {
clearInterval(timer);
};
self.tableDom.onmouseout = function () {
timer = setInterval(self.rollStart, t);
};
},
rollStart: function () {
if (
this.scrollContentDom.scrollTop >=
this.scrollContentDom.scrollHeight / 2
) {
this.scrollContentDom.scrollTop = 0;
} else {
this.scrollContentDom.scrollTop++;
}
},
@keyframes scrollTop {
0% {
transform: translateY(30px);
}
100% {
transform: translateY(calc(-100% + 510px));
}
}
.content_scroll {
-webkit-animation: 15s scrollTop linear infinite normal;
animation: 15s scrollTop linear infinite normal;
}
.content_scroll:hover {
animation-play-state: paused;
}