最新亚洲精品福利在线,欧美一区二区三区大片,久久91无码一区二区三区,色哟哟免费观看视频入口,美女裸露双奶头屁股无裸体

Jquery實(shí)現(xiàn)固定頂部導(dǎo)航欄

時(shí)間:2016-10-19 15:14:20 類型:JS/JQUERY
字號(hào):    

<html>

<head>

    <title>scroll()函數(shù)用法</title>

<style>

#top{hieght:100px;width:100%}

.scro{position: fixed;z-index: 999999;box-shadow: 0 2px 3px #ccc;}

</style>

</head>

<body>

    <div id="top"></div>

</body>

</html>

<!--引入jq函數(shù)庫省略-->

<script>

<!--滾動(dòng)時(shí)頂部導(dǎo)航固定-->
$(function(){
    $(window).scroll(function(){
        var scro = $(window).scrollTop();
        if(scro > 100)
            $('#top').addClass('scro');
        else
            $('#top').removeClass('scro');
    });
});

</script>