Scroll boxshadow动画速度滚动条

Scroll boxshadow动画速度滚动条,scroll,velocity.js,Scroll,Velocity.js,在滚动页面时,我正在使用velocity设置导航栏的动画。。一切正常,只是boxShadow属性没有设置动画 有人能帮我吗 HTML代码: <div id="home"> <div id="home_navbar"> <img id="home_logo" src="@/assets/web2x.png&q

在滚动页面时,我正在使用velocity设置导航栏的动画。。一切正常,只是boxShadow属性没有设置动画

有人能帮我吗

HTML代码:

    <div id="home">
        
        <div id="home_navbar">
            
            <img id="home_logo" src="@/assets/web2x.png">            
            
        </div>

  </div>

滚动功能:

    handleScroll(){
        
        clearTimeout(this.timer);
        
        this.timer = setTimeout(function(){    
            
            this.currentpos = $(window).scrollTop();
            
            // downscroll 
            if (this.currentpos > this.lastScrollTop){
                
                // if you scroll downwards and pass the 400 mark 
                if((this.lastScrollTop <= 400)&&(this.currentpos > 400)){
                    
                    Velocity($('#home_navbar'), {top: '0px', width: '98%', margin: '1%', boxShadow: '0px 10px 5px rgba(0, 0, 0, 1)'},{duration:400});                             
        
                }
            
            // upscroll
            } else {
                
                // if you scroll upwards and pass the 200 mark 
                if((this.lastScrollTop >= 200)&&(this.currentpos < 200)){
                    
                    Velocity($('#home_navbar'), {top: '0px', width: '100%', margin: '0%', boxShadow: '0px 10px 5px rgba(0, 0, 0, 0.16)'},{duration:400, easing:'easeInOutQuad'});                                
                    
                }                     
            
            }
            
            this.lastScrollTop = this.currentpos;                    
            
        }.bind(this), 50);                   
        
    },
handleScroll(){
clearTimeout(this.timer);
this.timer=setTimeout(函数(){
this.currentpos=$(window.scrollTop();
//低谷
如果(this.currentpos>this.lastScrollTop){
//如果向下滚动并通过400标记
如果((this.lastScrollTop 400)){
速度($('home'u navbar'),{top:'0px',width:'98%',margin:'1%',boxShadow:'0px 10px 5px rgba(0,0,0,1)},{duration:400});
}
//厄普斯克罗尔
}否则{
//如果向上滚动并通过200标记
如果((this.lastScrollTop>=200)和&(this.currentpos<200)){
速度($('home'u navbar'),{top:'0px',width:'100%',margin:'0%',boxShadow:'0px 10px 5px rgba(0,0,0,0.16)},{duration:400,easeInOutQuad:'easeInOutQuad'});
}                     
}
this.lastScrollTop=this.currentpos;
}.绑定(本),50);
},