-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
105 lines (97 loc) · 2.27 KB
/
Copy pathindex.html
File metadata and controls
105 lines (97 loc) · 2.27 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> SLIDER 1 </title>
<!-- HTML -->
<style>
body {
font-size: 15pt;
padding:0;
margin:0;
}
h3{
color:#49295F;
text-align:center;
}
#imageContainer{
width:100%;
max-width:360px;
height:100%;
margin:0 auto;
background:#08080B;
position: fixed;
}
#imageContainer .close{
position: absolute;
margin-left:90%;
border:none;
color:white;
background:none;
font-size: larger;
outline:none;
background:rgba(0,0,0,0.6);
}
#imageContainer .close:hover{
color:#5B8BE1;
}
#imageContainer #view{
width:100%;
height:85%;
background-color:#56597E;
transition: all;
transition-duration:600ms;
}
#imageContainer #imageList{
width:100%;
padding:5px;
display:flex;
align-items:center;
justify-content: flex-start;
overflow-x:auto;
overflow-y: hidden;
border-top:1px solid #aabbee;
}
#imageContainer #imageList img{
width:40px;
height:50px;
border-radius:2px;
background-color:#24274D;
margin-left:5px;
border-radius:4px;
transition: all;
transition-duration:800ms;
}
</style>
</head>
<body>
<script src="main.js"></script><!--
I wrote this code so in a way that everyone can use it easily
just put this js script http://austinesamuelcodes.000webhostapp.com/codes/main.js on your on HTML file
then call the imageSlider function any way in you code
with your image src In array format as pramiter
for example check bellow
-->
<script type="text/javascript">
onload=function(){
const myImages=[//list of images
{src:"https://i.imgur.com/uKlntMI.jpg"},
{src:"https://i.imgur.com/Tjn5WCY.jpg"},
{src:"https://i.imgur.com/U2UbGBr.jpg"}, //image urls
{src:"https://i.imgur.com/mfdDZAZ.jpg"},
{src:"https://i.imgur.com/YGuiIUA.jpg"},
{src:"https://i.imgur.com/fnajFDn.jpg"},
{src:"https://i.imgur.com/fVU1MFf.jpg"},
{src:"https://i.imgur.com/YTFqRaH.jpg"},
{src:"https://i.imgur.com/vvyBdZM.jpg"},
{src:"https://i.imgur.com/8MZEY2V.png"},
{src:"https://i.imgur.com/UhxKfPS.jpg"},
{src:"https://i.imgur.com/PiWc1hU.jpg"}//you put as many as you want
]
imageSlider(myImages);
}
</script>
</body>
</html>