jq 向右滚动,向下滚动,向左滚动,向上滚动

分类:jquery实践

 


<style>
    .news_wenzi{
      width:500px;
      height:100px;
      font-size:24px;
      position: fixed;      
      _position: absolute;
      top:300px;
      background-color: #8C2323;      
      text-align: center;
      z-index: 999;

    }
    .news_wenzi span{
      width:30px;
      height:20px;
      font-size:14px;
      position: absolute;
      top:0px;
      right:0px;
      background-color: #8C2323;
      color:#fff;
      cursor: pointer;
    }
    .news_wenzi a{height:100px;line-height: 100px; color:#fff;}
  </style>
  <script>
//以下是文字新闻跳动画JS函数
function jump5(){
  $('.news_wenzi').animate({"margin-left": 800},6500,function(){
    $('.news_wenzi').animate({"margin-top": 300},6500,function(){
      $('.news_wenzi').animate({"margin-left": 0},6500,function(){
        $('.news_wenzi').animate({"margin-top": 0},6500,function(){jump5();});
      });
    });
  });
    //function(){jump5();

}
jQuery(document).ready(function(){
  //以下是商务部跳动
  jump5();

  $(".news_wenzi").hover(function(){
    $(".news_wenzi").stop();
  },function(){
    jump5();
  });
  //关闭
  $(".news_wenzi span").click(function(){
    $(".news_wenzi").css("display","none");
  });
});
</script>
<div class="news_wenzi" >
  <a href="http://www.endbus.cn/">关于布士收藏夹</a>
  <span>关闭</span>
</div>

向右滚动,向下滚动,向左滚动,向上滚动

本文链接: jq 向右滚动,向下滚动,向左滚动,向上滚动
版权所有:布士收藏夹在网络收集,如有侵犯你的权利, 请联系QQ:641868752。

评论

发表评论

*

* (显示gravatar头像)

Ctrl+Enter快捷回复

© 2014 布士收藏夹 all rights reserved.