-
Notifications
You must be signed in to change notification settings - Fork 0
/
特别1demo.html
137 lines (123 loc) · 4.57 KB
/
特别1demo.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>query焦点轮播图</title>
<style type="text/css">
*{ margin: 0; padding: 0; text-decoration: none;}
body { padding: 20px;}
.imgLun { width: 600px; height: 400px; border: 3px solid #333; overflow: hidden; position: relative;}
.list { width: 4200px; height: 400px; position: absolute; z-index: 1;}
.list img { float: left;display: none;}
.banner { position: absolute; height: auto; width: 600px; z-index: 2; bottom: 0px;padding-bottom: 10px;padding-left: 30px; box-sizing: border-box;}
.miniPic img { cursor: pointer; float: left; border: 1px solid #fff; width: 60px; margin-right: 5px;}
.miniPic .on { background: orangered;}
.arrow { cursor: pointer; display: none; line-height: 39px; text-align: center; font-size: 36px; font-weight: bold; width: 40px; height: 40px; position: absolute; z-index: 2; top: 180px; background-color: RGBA(0,0,0,.3); color: #fff;}
.arrow:hover { background-color: RGBA(0,0,0,.7);}
.imgLun:hover .arrow { display: block;}
#prev { left: 20px;}
#next { right: 20px;}
.picTitle {font-size: 2em;color: white;text-align: center;}
.timeLine {
background-color: #464445;
width:3px;
height:300px;
position: absolute;
right: 50px;
top: 45px;
border-radius: 5px;
z-index: 2;
overflow: visible;
}
.timeLine ul li {
position: absolute;
left: -3.5px;
width: 10px;
height: 10px;
border-radius: 100%;
background-color: #0b0c0c;
list-style: none;
text-align: center;
font-size: 5px;
overflow: visible;
}
.timeLine ul li span {
position: absolute;
left: -45px;
font-size: 10px;
font-family: "微软雅黑";
color: white;
opacity: 0.9;
}
.timeLine ul li div {
width: 20px;
height: 20px;
background-color: black;
opacity: 0.6;
position: absolute;
top: -5px;
left: -5px;
visibility: hidden;
border-radius: 100%;
}
</style>
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
function lunbo (speed,option) {
var container = $('.imgLun');
var list = $('.list');
var miniPic = $('.miniPic img');
var prev = $("#prev");
var next = $('#next');
var index = 1;
var imgList = $('.list img');
var len = parseInt($(".list img").length);
var timer;
var myIndex;
var i = createPoint();
var picPoint = $(".timeLine ul li");
var imgWid = parseInt(imgList.eq(0).css("width")) ;
var j = $(".list img").eq(0).css("display","block");
function createPoint (){
heightline = parseInt($(".timeLine").css("height"));
for (var m = 0; m<len; m++)
{
$("<li><span>"+$(".list img").eq(m).attr("title")+"</span><div></div></li>").css("top",(m+1/2)*heightline/(len)+"px").appendTo($(".timeLine ul"));
}
}
picPoint.each(function () {
$(this).bind("mouseover" ,function () {
$(".list img").eq($(this).index()).show(speed).siblings().css("display","none");
for (var q = 0;q<len;q++ ) {
if (q == $(this).index()) {
$(".timeLine ul span ").eq(q).css('font-size',15+"px").css('opacity','1');
$(".timeLine ul div ").eq(q).css('visibility',"visible");
} else{
$(".timeLine ul span ").eq(q).css('font-size',10+"px").css('opacity','0.9');
$(".timeLine ul div ").eq(q).css('visibility',"hidden");
}
}
})
});
};
$(function () {lunbo (300)});
</script>
</head>
<body>
<div class="imgLun">
<div class="list" >
<!-- <img src="img/5.jpg" alt="1"/>-->
<img src="img/1.jpg" alt="1" title="123"/>
<img src="img/2.jpg" alt="2" title="456"/>
<img src="img/3.jpg" alt="3" title="678"/>
<img src="img/4.jpg" alt="4" title="890"/>
<img src="img/5.jpg" alt="5" title="1243"/>
<!-- <img src="img/1.jpg" alt="5"/>-->
</div>
<div class="timeLine">
<ul>
</ul>
</div>
</div>
</body>
</html>