重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

js判断滑动的距离设置css

window.onscroll = function() {
if(window.scrollY<50){
$('.header_nav1').css({
'position' : 'relative'
});
}
if(window.scrollY>50){
$('.header_nav1').css({

成都创新互联成立与2013年,先为鄠邑等服务建站,鄠邑等地企业,进行企业商务咨询服务。为鄠邑企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

            'z-index' : '100',
            'top' : '0',
            'position' : 'fixed'
        });
    }
} 

文章标题:js判断滑动的距离设置css
文章源于:http://cqcxhl.cn/article/ggoiie.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP