Skip to content

Commit e36e06a

Browse files
Merge pull request #383 from NehaaAcharya/feature/infinite-scrolling
Implemented infinite scrolling on example images in index.html
2 parents bc81646 + 0158c13 commit e36e06a

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
<div class="section" id="charts">
164164
<p class="heading reveal">Here are some examples of what you can do with Dataverse</p>
165165
<div class="examples reveal" id="examples">
166-
166+
167167
<img src="website/web_images/volcano.gif" alt="">
168168
<img src="website/web_images/live.gif" alt="">
169169
<img src="https://i0.wp.com/learnbyinsight.com/wp-content/uploads/2020/09/sub-plot.png?resize=600%2C398&ssl=1"

website/styles/style.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,40 @@ input {
12091209
padding: 10px;
12101210
border: 1px solid rgba(128, 128, 128, 0.352);
12111211
}
1212+
/* Infinite scroll */
1213+
#examples, #examples2 {
1214+
display: flex;
1215+
flex-wrap: nowrap;
1216+
overflow: hidden;
1217+
width: 100%;
1218+
}
1219+
1220+
.examples img {
1221+
margin-right: 20px;
1222+
width: 200px;
1223+
}
1224+
1225+
#examples:not(:hover) img,#examples2:not(:hover) img{
1226+
animation: scrollImages 10s linear infinite;
1227+
}
1228+
1229+
#examples:hover img, #examples2:hover img {
1230+
animation-play-state: paused;
1231+
}
1232+
1233+
1234+
#examples img:hover, #examples2 img:hover {
1235+
animation-play-state: paused;
1236+
}
1237+
1238+
@keyframes scrollImages {
1239+
0% {
1240+
transform: translateX(0);
1241+
}
1242+
100% {
1243+
transform: translateX(-100%);
1244+
}
1245+
}
12121246
/*===========================RESPONSIVE===================================*/
12131247
@media screen and (max-width: 660px) {
12141248
.navbarButton {

0 commit comments

Comments
 (0)