-
Notifications
You must be signed in to change notification settings - Fork 10
/
51.手风琴效果.html
60 lines (60 loc) · 1.59 KB
/
51.手风琴效果.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
ul,li,*{
padding:0;
margin:0;
}
.box{
width:1000px;
height:400px;
border:1px solid orange;
margin:100px auto;
border-left:0;
overflow: hidden;
}
.list{
width:1020px;
height:400px;
}
.list li{
width:199px;
border-left:1px solid orange;
height:400px;
float: left;
list-style: none;
overflow: hidden;
}
img{
/*display: block;*/
border:0;
}
</style>
<script src="jquery-1.12.1.min.js"></script>
<script>
$(document).ready(function(){
var aLi=$('.list li');
aLi.hover(function(){
$(this).stop().animate({'width':599},500);
$(this).siblings().stop().animate({'width':99},500);
},function(){
aLi.animate({'width':199},500);
})
})
</script>
</head>
<body>
<div class="box">
<ul class="list">
<li><a href="javascript:;"><img src="img/11.jpg"/></a></li>
<li><a href="javascript:;"><img src="img/22.jpg"/></a></li>
<li><a href="javascript:;"><img src="img/33.jpg"/></a></li>
<li><a href="javascript:;"><img src="img/44.jpg"/></a></li>
<li><a href="javascript:;"><img src="img/55.jpg"/></a></li>
</ul>
</div>
</body>
</html>