zoukankan      html  css  js  c++  java
  • jQuery UI加入效果

    1、设计源代码

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>加入效果</title>
    <link rel="stylesheet" href="../js/jquery-ui-1.10.4/development-bundle/themes/base/jquery.ui.all.css">
    <script src="../js/jquery-ui-1.10.4/development-bundle/jquery-1.10.2.js"></script>
    <script src="../../js/jquery-ui-1.10.4/development-bundle/ui/jquery.ui.effect.js"></script>
    <link rel="stylesheet" href="../js/jquery-ui-1.10.4/development-bundle/demos/demos.css">
    <style>
       .effect{
           500px;
          height: 300px;
          position: relative;
       }
       .effect-content{
           200px;
          height: 100px;
          font-size: 40px;
          border: 1px solid #FF0000;
          color: #00FF00;
          padding: 10px;
       }
       .divClass{
          text-indent: 10px;
          letter-spacing: 20px;
           300px;
          height: 200px;
          padding: 10px;
          font-size: 50px;
          font-weight: bolder;
       }
       #btn{
           200px;
          height: 100px;
          font-size: 30px;
          cursor: pointer;
       }
    </style>
    <script>
       $(function(){
    	   $("#btn").click(function(){
    		   $(".effect-content").addClass("divClass",2000,callFunc);
    		   
    		   return false;
    	   });
    	   
    	   var callFunc = function(){
    		   setTimeout(function(){
    			   $(".effect").removeClass("divClass");
    		   },2000);
    	   }
       });
    </script>
    </head>
    <body>
       <div class="effect">
            <div class="effect-content ui-corner-all" >
                 	上下左右
            </div>
       </div>
       <button id="btn" class="ui-state-default ui-corner-all">效果</button>
    </body>
    </html>

    2、实现结果

    (1)初始化


    (2)点击按钮后


  • 相关阅读:
    Windows程序调试系列: 使用VC++生成调试信息 转
    mysql基础
    mysql bug
    VS2010下配置Winpcap 开发环境
    WIN7 下面 装XP
    Iptables 指南 1.1.19
    mysql内核 innodb存储引警(卷1)配书 用VS 2003 编绎 mysql-3.23.49 源代码
    cmake
    Windows+VS2012环境下编译调试MySQL源码 转
    哈佛图书馆自习室墙上的训言 (自勉)
  • 原文地址:https://www.cnblogs.com/gccbuaa/p/7275308.html
Copyright © 2011-2022 走看看