jquery实现上下浮动:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
    $(document).ready(function()
      {
      $("button").click(function(){

            a();

      });
    });    
    
    <!--递归循环-->
    function a(){
        $("#p1").css("color","red").slideUp(2000).slideDown(2000,function(){
            a();
        });
    }
</script>
</head>
<body>

<p id="p1">菜鸟教程!!</p>
<button>点我</button>

</body>
</html>

 

相关文章:

  • 2022-01-07
  • 2021-06-14
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2021-12-05
  • 2021-11-16
相关资源
相似解决方案