From 9956896401adf13cb1af02613fbc2e3e361f9326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=B8=E4=B8=8A=E6=89=AB=E9=9B=B7?= Date: Mon, 20 Feb 2017 10:53:35 +0800 Subject: [PATCH] Fix --- examples/components/header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/components/header.vue b/examples/components/header.vue index 3dea6096..e66138a8 100644 --- a/examples/components/header.vue +++ b/examples/components/header.vue @@ -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 })`; } });