Skip to content

Commit

Permalink
Added infinite scrolling and hover-pause functionality in style.css
Browse files Browse the repository at this point in the history
  • Loading branch information
NehaaAcharya committed Jan 17, 2025
1 parent e620b59 commit 0158c13
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions website/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,40 @@ input {
padding: 10px;
border: 1px solid rgba(128, 128, 128, 0.352);
}
/* Infinite scroll */
#examples, #examples2 {
display: flex;
flex-wrap: nowrap;
overflow: hidden;
width: 100%;
}

.examples img {
margin-right: 20px;
width: 200px;
}

#examples:not(:hover) img,#examples2:not(:hover) img{
animation: scrollImages 10s linear infinite;
}

#examples:hover img, #examples2:hover img {
animation-play-state: paused;
}


#examples img:hover, #examples2 img:hover {
animation-play-state: paused;
}

@keyframes scrollImages {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-100%);
}
}
/*===========================RESPONSIVE===================================*/
@media screen and (max-width: 660px) {
.navbarButton {
Expand Down

0 comments on commit 0158c13

Please sign in to comment.