This commit is contained in:
纸上扫雷 2017-02-20 10:53:35 +08:00 committed by cinwell.li
parent 5dbad821da
commit 9956896401

View File

@ -259,7 +259,7 @@
scroll(() => {
if (this.isHome) {
const threshold = 200;
let alpha = Math.min(document.body.scrollTop, threshold) / threshold;
let alpha = Math.min((document.documentElement.scrollTop || document.body.scrollTop), threshold) / threshold;
this.$refs.header.style.backgroundColor = `rgba(32, 160, 255, ${ alpha })`;
}
});