css滚动条

1、顶部滚动条

<img src="1.jpg">

<script>
$(".loading .pic").animate({width:10%},100);
</script>

<img src="2.jpg">

<script>
$(".loading .pic").animate({width:50%},100);
</script>

<img src="3.jpg">

<script>
$(".loading .pic").animate({width:100%},100,function(){
        $(".loading").fadeOut();   
});
</script>


<style>
.loading{width:100%;height:100%;position:fixed;top:0;left:0;z-index:100;background:#fff;}
.loading .pic{width:100%;height:10px;position:absolute;top:0;left:0;
background:#f33}
</style>


<div class="loading">
    <div class="pic"></div>
<div>

  

posted @ 2017-09-19 22:48  N神3  阅读(168)  评论(0编辑  收藏  举报