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{
width: 500px;
height: 300px;
position: relative;
}
.effect-content{
width: 200px;
height: 100px;
font-size: 40px;
border: 1px solid #FF0000;
color: #00FF00;
padding: 10px;
}
.divClass{
text-indent: 10px;
letter-spacing: 20px;
width: 300px;
height: 200px;
padding: 10px;
font-size: 50px;
font-weight: bolder;
}
#btn{
width: 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)初始化

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

(2)点击按钮后

最新文章

  1. Mac电脑如何读取Android手机上的文件
  2. Android画面显示原理
  3. C#网络编程之--TCP协议(一)
  4. C++ map使用(基于RBTree)
  5. 记录Hibernate的缓存知识
  6. VS(VisualStudio)中折叠代码、打开代码的快捷键
  7. codeforces 617BChocolate
  8. NGINX(七)分段下载
  9. 【Unity Shaders】使用CgInclude让你的Shader模块化——Unity内置的CgInclude文件
  10. nginx 502 Bad Gateway 错误问题收集
  11. Apache的htaccess文件出现500错误的原因
  12. chrome浏览器如何在本地安装谷歌访问助手教程
  13. adb报错:The connection to adb is down, and a severe&amp;nbs
  14. rs(0)与rs(&quot;字段名&quot;)的区别
  15. python 10道面试陷阱题目
  16. 高斯消元处理无解|多解情况 poj1830
  17. VeeamBackup9.5-查看和添加备份设备
  18. dcloud资源升级方式更新app
  19. oauth 2.0转
  20. winform npoi excel 样式设置

热门文章

  1. python之八大排序方法
  2. python 复习 4-1 函数、参数、返回值、递归
  3. 【 LVS 】类型及算法
  4. 【SQL】多个表的查询
  5. 《Java编程思想》笔记 第十八章 Java I/O 系统
  6. tushrea知识笔记
  7. css深入理解之border
  8. gaggd
  9. error: &#39;Can&#39;t connect to local MySQL server through socket &#39;/var/run/mysqld/mysqld.sock&#39; (2)&#39;
  10. ubuntu14.04 安装 pyv8