JQuery中的动画(ppt)
<!DOCTYPE html>
<html>
<head>
<title>test1.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../js/jquery-3.3.1.js"></script>
<script type="text/javascript">
$(function(){
$("#aa").click(function(){
//显示
//show()
//$("#pic").show(3000); //fadeIn()
//$("#pic").fadeIn(); //slideDown()
//$("#pic").slideDown();
});
$("#bb").click(function(){
//隐藏
//hide
//$("#pic").hide(3000); //fadeOut()
//$("#pic").fadeOut(); //slideUp
//$("#pic").slideUp();
}); $("#cc").click(function(){
$("#pic").toggle();
}); });
</script>
</head> <body>
<button id="aa">show</button>
<button id="bb">hide</button>
<button id="cc">toggle</button><br>
<img src="../images/6.jpg" name="picture" id="pic" style="display:none">
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>test2.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../js/jquery-3.3.1.js"></script>
<script type="text/javascript">
$(function(){
$("#aa").click(function(){
$("#pic").animate({left:"+=300px"},3000)
.animate({top:"+=300px",height:"500px"},3000,function(){
$(this).css({opacity:"0.5"});
});
});
$("#bb").click(function(){
//$("#pic").stop(); //暂停当前的,执行下一个动画
//$("#pic").stop(true); //清除队列
//$("#pic").stop(true,true);//直接到达目前动画的末状态
$("#pic").stop(false,true);
});
}); </script>
</head> <body>
<button id="aa">go</button>
<button id="bb">out</button><br>
<img src="../images/6.jpg" name="picture" id="pic" style="position: absolute;">
</body>
</html>
JQuery中的动画(ppt)的更多相关文章
- jQuery学习笔记(四)jQuery中的动画
目录 show()方法和hide()方法 fideIn()方法和fadeOut()方法 slideUp方法和slideDown()方法 自定义动画方法animate toogle(),slideTog ...
- 第五章 jQuery中的动画
通过jQuery中的动画方法,能轻松地为网页添加精彩的视觉效果,给用户一种全新体验. 1.show()方法和hide()方法 该方法的功能与css()方法设置display属性效果相同. 给show( ...
- jQuery中animate动画第二次点击事件没反应
jQuery中animate动画第二次点击事件没反应 用animate做点击翻页动画时发现第二次点击事件动画没反应,而第一次点击有动画效果,代码如下: 复制代码 代码如下: $(".page ...
- jQuery中的动画理论干货
[jQuery中的动画] 通过jQuery动画能够轻松地为页面添加精彩的视觉效果 [show()方法和hide()方法]1.show()方法和hide()方法是jQUERY中最基本的动画方法,相当于在 ...
- 史上最全的CSS hack方式一览 jQuery 图片轮播的代码分离 JQuery中的动画 C#中Trim()、TrimStart()、TrimEnd()的用法 marquee 标签的使用详情 js鼠标事件 js添加遮罩层 页面上通过地址栏传值时出现乱码的两种解决方法 ref和out的区别在c#中 总结
史上最全的CSS hack方式一览 2013年09月28日 15:57:08 阅读数:175473 做前端多年,虽然不是经常需要hack,但是我们经常会遇到各浏览器表现不一致的情况.基于此,某些情况我 ...
- jQuery笔记(四)jQuery中的动画
jQuery最吸引人的地方莫过于能做出绚丽的动画了,也是能极大提高用户体验的地方,这次我们就来一探jQuery中的动画! 一. show()方法和hide()方法 show()方法与hide()方法是 ...
- jQuery中的动画与特效
1.显示和隐藏hide()和show() 对于动画来说,显示和隐藏是最基本的效果之一,简单介绍jQuery的显示和隐藏. <script type="text/javascript&q ...
- JQuery中的动画
一.show()方法和hide()方法 这两种方法是jQuery动画的最基本方法.当为元素调用show方法时相当于将该元素的display样式改为block或者inline,同理,如果当元素调用hid ...
- 【学习笔记】jQuery中的动画与效果
1.基本效果 匹配元素从左上角开始变浓变大或缩小到左上角变淡变小 ①隐藏元素 除了可以设置匹配元素的display:none外,可以用以下函数 hide(speed,[callback]) 返回值: ...
- jQuery中的动画与效果
1.基本效果 匹配元素从左上角开始变浓变大或缩小到左上角变淡变小 ①隐藏元素 除了可以设置匹配元素的display:none外,可以用以下函数 hide(speed,[callback]) 返回值: ...
随机推荐
- 自定义orderBy字母函数
orderedUsers: function () { var arr = this.users; for (var i = 0; i < arr.length - 1; i++) { for ...
- jquery和ajax,json写法的说明
一: 在ajax中,如果没有用jquery,则如xmlHttpRequest.open("POST", "AjaxServlet", true); (1)如果用 ...
- 51nod加农炮
这道题维护一下前缀最大值然后二分答案就好了哇 233 #include<cstdio> #include<cstring> #include<algorithm> ...
- [BZOJ1151][CTSC2007]动物园zoo 解题报告|DP|位运算
Description 最近一直在为了学习算法而做题,这道题是初一小神犇让我看的.感觉挺不错于是写了写. 这道题如果是一条线的话我们可以构造一个DP f[i,j]表示以i为起点,i,i+1...i+4 ...
- Ajax的Result工具类
ResultUtil.java package cn.qlq.util; import java.io.Serializable; public class ResultUtil<T> i ...
- Oracle基础 01 表空间 tablespace
--查看表空间 select * from dba_tablespaces; select * from v$tablespace; select * from dba_data_files; --查 ...
- 【LYOI2016】EasyRound1
这可能是给新高一写的吧……随手写着玩玩…… A:随便模拟 #include<cstdio> #include<cstring> using namespace std; int ...
- JAVA 批量执行测试用例
如果多个测试用例在不同的类中,又需要一次性执行完所有的测试用例,则可以使用到Junit中的批量执行测试方法. 方法一 这种方式非常简单,不需要额外多写一行代码,Eclipse 本来就支持以项目或包为单 ...
- ros 如何使用 openni2_launch
There is very little actual code/etc in openni2_launch, it is mostly a thin wrapper around openni2_c ...
- centeros7远程访问mysql5.7
先启动firewall防火墙: service firewalld start 打开3306端口: firewall-cmd --add-port=/tcp --permanent mysql授权ro ...