-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (101 loc) · 2.9 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Image Scroll</title>
<style>
* {
margin: 0;
padding: 0;
font-size: 1rem;
box-sizing: border-box;
text-decoration: none;
color: white;
font-weight: normal;
cursor: default;
}
body {
font-family: Ubuntu, sans-serif;
}
.container {
display: flex;
flex-direction: column;
gap: 20px;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #313952;
h1 {
font-size: 2rem;
font-weight: bold;
border-bottom: 2px solid #676767;
}
}
.image-scroll-container {
width: 650px;
height: 420px;
overflow-x: scroll;
scroll-snap-type: x mandatory;
display: flex;
.card {
scroll-margin: 0;
}
}
.image-list {
display: flex;
height: 400px;
}
.card {
display: flex;
position: relative;
scroll-snap-align: start;
.image-title {
font-size: 2rem;
font-weight: bold;
background-color: #125e4b;
width: 50px;
height: 400px;
padding-bottom: 10px;
writing-mode: sideways-lr;
text-orientation: mixed;
position: sticky;
bottom: 0;
left: 0;
}
img {
width: 600px;
height: 400px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Image Scroll</h1>
<div class="image-scroll-container">
<div class="image-list">
<div class="card">
<div class="image-title">Cat</div>
<img src="./images/cat.jpg" alt="Cat Image">
</div>
<div class="card">
<div class="image-title">Classic Nisan</div>
<img src="./images/classic-nissan.jpg" alt="Red Classic Nissan Image">
</div>
<div class="card">
<div class="image-title">Heavenly Cloud</div>
<img src="./images/heavenly-cloud.jpg" alt="Heavenly Cloud Image">
</div>
<div class="card">
<div class="image-title">Mute Swan</div>
<img src="./images/mute-swan.jpg" alt="Mute Swan Image">
</div>
<div class="card">
<div class="image-title">Silhouette Photo</div>
<img src="./images/silhouette-photo.jpg" alt="Silhouette Image">
</div>
</div>
</div>
</div>
</body>
</html>