[JavaScript] jQuery通过fadeout控制元素渐隐效果 →→→→→进入此内容的聊天室

来自 , 2019-02-15, 写在 JavaScript, 查看 152 次.
URL http://www.code666.cn/view/5011bf6d
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
  5. </script>
  6. <script>
  7. $(document).ready(function(){
  8.   $("button").click(function(){
  9.     $("#div1").fadeOut();
  10.     $("#div2").fadeOut("slow");
  11.     $("#div3").fadeOut(3000);
  12.   });
  13. });
  14. </script>
  15. </head>
  16.  
  17. <body>
  18. <p>Demonstrate fadeOut() with different parameters.</p>
  19. <button>Click to fade out boxes</button>
  20. <br><br>
  21. <div id="div1" style="width:80px;height:80px;background-color:red;"></div><br>
  22. <div id="div2" style="width:80px;height:80px;background-color:green;"></div><br>
  23. <div id="div3" style="width:80px;height:80px;background-color:blue;"></div>
  24.  
  25. </body>
  26. </html>
  27.  
  28. //javascript/8007

回复 "jQuery通过fadeout控制元素渐隐效果"

这儿你可以回复上面这条便签

captcha