-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (61 loc) · 2.24 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CSS Slider</title>
<style>
* {box-sizing:border-box; transition:opacity 1s ease-in-out;}
.fader div, .fader div img {width:100%; margin:0;}
.fader > div {position:absolute; z-index:0;}
.fader div:target {z-index:1; opacity:1;}
.fader div:not(:target) {opacity:0;}
.fader div a {background:#333; display:block; height:100%; width:10%; position:absolute; top:0; left:0; opacity:0;}
.fader div a:hover {opacity:.5}
.fader div .next {right:0; left:auto;}
.fader {position:relative; width:100%; max-height:500px; overflow:hidden; margin-bottom:10px; border:10px solid #fefefe; box-shadow: 0 0 3px 1px #eee;}
.fader-controls {text-align:center; width:100%; z-index:2;}
.fader-controls a {display:inline-block; border-radius:100%; height:10px; width:10px; margin:0 5px; border:1px solid #ccc; background:#efefef;}
.fader-controls a:hover {background:#aabbb9;}
#page {width:100%; max-width:960px; margin:0 auto; position:relative}
@media all and (min-width:560px) {
.fader {height:500px;}
}
@media all and (min-device-width:0px) and (max-device-width:560px) {
.fader {height:300px;}
}
</style>
</head>
<body>
<div id="page">
<div class="fader">
<div id="slide1" >
<img src="http://l.yimg.com/os/152/2012/10/26/FOSTER-Dachshund-6years-jpg_191727.jpg" />
<a href="#slide4" class="prev"></a>
<a href="#slide2" class="next"></a>
</div>
<div id="slide2" >
<img src="http://l.yimg.com/os/152/2012/10/26/ALEX-LabradorRetriever-7years-jpg_191728.jpg" />
<a href="#slide1" class="prev"></a>
<a href="#slide3" class="next"></a>
</div>
<div id="slide3">
<img src="http://l.yimg.com/os/152/2012/10/26/OSHI-CockerSpaniel-6years-jpg_191733.jpg" />
<a href="#slide2" class="prev"></a>
<a href="#slide4" class="next"></a>
</div>
<div id="slide4">
<img src="http://l.yimg.com/os/152/2012/10/26/REX-Boxer-3years-jpg_191734.jpg" />
<a href="#slide3" class="prev"></a>
<a href="#slide1" class="next"></a>
</div>
</div>
<div class="fader-controls">
<a href="#slide1"></a>
<a href="#slide2"></a>
<a href="#slide3"></a>
<a href="#slide4"></a>
</div>
</div>
</body>
</html>