<!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)的更多相关文章

  1. jQuery学习笔记(四)jQuery中的动画

    目录 show()方法和hide()方法 fideIn()方法和fadeOut()方法 slideUp方法和slideDown()方法 自定义动画方法animate toogle(),slideTog ...

  2. 第五章 jQuery中的动画

    通过jQuery中的动画方法,能轻松地为网页添加精彩的视觉效果,给用户一种全新体验. 1.show()方法和hide()方法 该方法的功能与css()方法设置display属性效果相同. 给show( ...

  3. jQuery中animate动画第二次点击事件没反应

    jQuery中animate动画第二次点击事件没反应 用animate做点击翻页动画时发现第二次点击事件动画没反应,而第一次点击有动画效果,代码如下: 复制代码 代码如下: $(".page ...

  4. jQuery中的动画理论干货

    [jQuery中的动画] 通过jQuery动画能够轻松地为页面添加精彩的视觉效果 [show()方法和hide()方法]1.show()方法和hide()方法是jQUERY中最基本的动画方法,相当于在 ...

  5. 史上最全的CSS hack方式一览 jQuery 图片轮播的代码分离 JQuery中的动画 C#中Trim()、TrimStart()、TrimEnd()的用法 marquee 标签的使用详情 js鼠标事件 js添加遮罩层 页面上通过地址栏传值时出现乱码的两种解决方法 ref和out的区别在c#中 总结

    史上最全的CSS hack方式一览 2013年09月28日 15:57:08 阅读数:175473 做前端多年,虽然不是经常需要hack,但是我们经常会遇到各浏览器表现不一致的情况.基于此,某些情况我 ...

  6. jQuery笔记(四)jQuery中的动画

    jQuery最吸引人的地方莫过于能做出绚丽的动画了,也是能极大提高用户体验的地方,这次我们就来一探jQuery中的动画! 一. show()方法和hide()方法 show()方法与hide()方法是 ...

  7. jQuery中的动画与特效

    1.显示和隐藏hide()和show() 对于动画来说,显示和隐藏是最基本的效果之一,简单介绍jQuery的显示和隐藏. <script type="text/javascript&q ...

  8. JQuery中的动画

    一.show()方法和hide()方法 这两种方法是jQuery动画的最基本方法.当为元素调用show方法时相当于将该元素的display样式改为block或者inline,同理,如果当元素调用hid ...

  9. 【学习笔记】jQuery中的动画与效果

    1.基本效果 匹配元素从左上角开始变浓变大或缩小到左上角变淡变小 ①隐藏元素 除了可以设置匹配元素的display:none外,可以用以下函数 hide(speed,[callback])  返回值: ...

  10. jQuery中的动画与效果

    1.基本效果 匹配元素从左上角开始变浓变大或缩小到左上角变淡变小 ①隐藏元素 除了可以设置匹配元素的display:none外,可以用以下函数 hide(speed,[callback])  返回值: ...

随机推荐

  1. Phantomjs设置浏览器useragent的方式

    Selenium中使用PhantomJS,设置User-Agent的方法. 默认情况下,是没有自动设置User-Agent的:设置PhantomJS的user-agent def __init__(s ...

  2. bzoj 1293 贪心

    首先我们可以将这道题看成一个数轴,数轴其中的某些点存在一些颜色,我们要选取最短的一段,使这段存 在所有颜色,那么我们使用指针i,j表示在j-i位置中包含的颜色,那么初值是0,0,我们先i++,同时添加 ...

  3. LeetCode 4 :Majority Element

    problem:Given an array of size n, find the majority element. The majority element is the element tha ...

  4. js中给easyui的一列添加按钮

    $("#totalTb").datagrid({ columns: [[                { field: 'ENTITY_ACTNAME', title: '活动名 ...

  5. Entity Framework 6.1.2 offset row fetch next 错误解决办法

    本地测试环境用的SqlServer2012,生产环境2008R2.然后在查询分页数据时生产环境悲剧的报错了. 原因是EF6.1.2以上版本在编译SQL时使用了新的语法对低版本的SqlServer不兼容 ...

  6. 【luogu2574】xor的艺术

    一道无聊的线段树题,写着玩玩而已…… #include<bits/stdc++.h> #define N 1000010 #define lson (o<<1) #define ...

  7. java 定时器的三种方式

    原地址:http://blog.csdn.net/haorengoodman/article/details/23281343/ /** * 普通thread * 这是最常见的,创建一个thread, ...

  8. python的算法:二分法查找(1)

    1.什么是二分法查找: 1.从数组的中间元素开始,如果中间元素正好是要查找的元素,则搜素过程结束: 2.如果某一特定元素大于或者小于中间元素,则在数组大于或小于中间元素的那一半中查找,而且跟开始一样从 ...

  9. poj 1654(利用叉积求面积)

    Area Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 17937   Accepted: 4957 Description ...

  10. MATLAB的简单动画制作

    这里介绍两种类型的动画实现,一种使用getframe和movie命令实现帧动画,另一种使用comet(comet3)命令实现画图过程的动画. ①getframe和movie命令实现帧动画 例如,创建一 ...