diff --git a/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue b/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue index bfe270e01321d91ba75053ffab9fef08b5028e12..7fbccc4890f7c38d7a0ea6d94b0cb8dcd080b4a0 100644 --- a/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue +++ b/pages/template/scroll-fold-nav2/scroll-fold-nav2.uvue @@ -46,10 +46,10 @@ onScroll(e : ScrollEvent) { let scrollTop = e.detail.scrollTop this.boxNode?.style?.setProperty('height', (110 - (scrollTop > 40 ? 40 : scrollTop)) + 'px'); - this.boxNode?.style?.setProperty('background-color', 'rgba(255, 255, 255, ' + (scrollTop * 3 > 100 ? 100 : scrollTop * 3) / 100 + ')'); + this.boxNode?.style?.setProperty('backgroundColor', 'rgba(255, 255, 255, ' + (scrollTop * 3 > 100 ? 100 : scrollTop * 3) / 100.0 + ')'); this.navNode?.style?.setProperty('opacity', 1 - (scrollTop * 3 > 100 ? 100 : scrollTop * 3) / 100.0); this.searchNode?.style?.setProperty('width', 700 - (scrollTop > 40 ? 40 : scrollTop) + 'rpx'); - this.searchNode?.style?.setProperty('top', 0 - (scrollTop > 40 ? 40 : scrollTop) + 'px'); + this.searchNode?.style?.setProperty('top', 0 - (scrollTop > 40 ? 40 : scrollTop) + 'px'); this.scrollTop = scrollTop; }, back() {