zoukankan      html  css  js  c++  java
  • 基于jquery实现的文字淡入淡出效果

    这篇文章介绍了jquery实现的文字淡入淡出效果实例,有需要的朋友可以参考一下
    复制代码代码如下:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head>  
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
    <title>无标题文档- www.jbxue.com</title>  
    <script type="text/javascript" language="javascript" src="../../jquery-1.7.1.min.js">  
    </script>  
    <script language="javascript">  
    $(document).ready(function(){  
        $("#btn1").toggle(function(){  

                $("p").fadeOut("slow");  
                },function(){  
                    $("p").fadeIn("slow");     

            });  
            $("#btn2").toggle(function(){  

                $("p").fadeTo("slow",0.66);  
                },function(){  
                    $("p").fadeTo("slow",0.66);   
            });   
        });  

    </script>  
    </head>  

    <body>  
    <p style="background:#3F3">this is pi<br>  
    this is pi<br>  
    this is pi<br>  
    this is pi<br>  
    this is pi<br>  
    this is pi<br>  
    </p>  
    <input type="button" value="淡入/淡出" id="btn1">  
    </body>  
    <input type="button" value="淡入/淡出 效果 透明度0.66" id="btn2">  
    </html> 

  • 相关阅读:
    BZOJ1217: [HNOI2003]消防局的设立
    BZOJ3925: [Zjoi2015]地震后的幻想乡
    BZOJ2328: [HNOI2011]赛车游戏
    BZOJ1011: [HNOI2008]遥远的行星
    BZOJ2007: [Noi2010]海拔
    BZOJ1833: [ZJOI2010]count 数字计数
    BZOJ1026: [SCOI2009]windy数
    BZOJ1196: [HNOI2006]公路修建问题
    BZOJ1076: [SCOI2008]奖励关
    BZOJ2752: [HAOI2012]高速公路(road)
  • 原文地址:https://www.cnblogs.com/linuxnotes/p/3424608.html
Copyright © 2011-2022 走看看