-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (82 loc) · 2.61 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body {
padding: 0;
margin: 0;
}
.wrapper {
position: relative;
height: 100vh;
overflow: hidden;
}
/* initial state for all slides */
.slide {
display: flex;
flex-direction: column;
flex-wrap: wrap;
height: 100vh;
position: absolute;
width: 100%;
/* initially positions the slides "off-screen" to the right */
left: 100%;
transition: transform 1s ease-out;
/* lower z=index ensures that these will slide "behind" the .current slide when transitioning back */
z-index: 0;
}
/* Currently shown slide */
.current {
/* This effectively gives the slide a `left` value of 0 */
transform: translateX(-100%);
/* z-index ensures this slide is on top of all other slides */
z-index: 2;
}
/* Slide transitionary state to move the current slide left as we switch slides */
.slide-out {
/* This effectively gives the slide a `left` value of -100%, putting the slide "off-screen" to the left */
transform: translateX(-200%);
z-index: 1;
}
img {
outline: solid 5px #fff;
}
.single img {
width: 100%;
height: 100%;
}
.split img {
width: 50%;
height: 100%;
}
.quad img {
width: 50%;
height: 50%;
}
</style>
</head>
<body>
<div class="wrapper">
<!-- Start off with the first slide as "current" -->
<div class="slide single current">
<img src="https://dummyimage.com/3840x2160/000/fff">
</div>
<div class="slide split">
<img src="https://dummyimage.com/3840x2160/000/fff">
<img src="https://dummyimage.com/3840x2160/000/fff">
</div>
<div class="slide quad">
<img src="https://dummyimage.com/3840x2160/000/fff">
<img src="https://dummyimage.com/3840x2160/000/fff">
<img src="https://dummyimage.com/3840x2160/000/fff">
<img src="https://dummyimage.com/3840x2160/000/fff">
</div>
</div>
<script src="index.js" type="application/javascript"></script>
</body>
</html>