File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+ <html xmlns="http://www.w3.org/1999/xhtml">
3+ <head>
4+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+ <title>制作简单动画效果</title>
6+ <script src="jquery-2.1.1.js"></script>
7+
8+ <style type="text/css">
9+ #book{
10+ width : 200px;
11+ height : 200px;
12+ position : relative;
13+ background : red;
14+ left : 5px;
15+ opacity :1;
16+ }
17+ </style>
18+
19+ <script type="text/javascript">
20+
21+ $(function() {
22+ $('#clickme').click(function() {
23+ $('#book').animate({
24+ opacity: 'hide',
25+ width: 'hide',
26+ height: 'toggle'
27+ });
28+ });
29+ })
30+ </script>
31+ </head>
32+ <body>
33+
34+ <button type="button" id="clickme">点击我</button>
35+ <img id="book" />
36+
37+
38+ </body>
39+ </html>
You can’t perform that action at this time.
0 commit comments