-
Notifications
You must be signed in to change notification settings - Fork 0
/
视觉特效.html
27 lines (25 loc) · 1.29 KB
/
视觉特效.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jqueryUI提供的视觉特效</title>
<link rel="stylesheet" type="text/css" href="jqueryui/jquery-ui.min.css"/>
</head>
<body>
<img id="img1" src="images/a.jpg" width="240px" height="300px"/>
<img id="img2" src="images/b.jpg" width="240px" height="300px"/>
<script src="js/jq-1.11.3.js" type="text/javascript" charset="utf-8"></script>
<script src="jqueryui/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#img1").effect("blind",{mode:'hide',direction:'horizontal'},1000); //effect()方法,blind显示隐藏特效
$("#img2").effect("blind",{mode:'show',direction:'horizontal'},1000); //图二滑入图一位置,horizontal水平,vertical垂直
$("#img1").effect("fold",{mode:'show',horizFirst:true,size:75},1000);//先水平后垂直的显示
$("#img1").effect("explode",{mode:'hide',pieces:'25'},1000); //爆炸效果
$("#img1").effect("bounce",{mode:'show',times:3},1000); //反弹效果
$("#img2").effect("pulsate",{times:2},1000); //闪动效果
$("#img2").delay(3100).effect("shake",{times:3,direction:'up'},1000); //震动效果,delay()方法设置时间的延迟
});
</script>
</body>
</html>