Skip to content

Instantly share code, notes, and snippets.

@Akifcan
Created March 31, 2021 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akifcan/8e59ca4b6ac4d7395ffb5ef3eeb9bb70 to your computer and use it in GitHub Desktop.
Save Akifcan/8e59ca4b6ac4d7395ffb5ef3eeb9bb70 to your computer and use it in GitHub Desktop.
medium carousel article
.slider {
border-radius: 0.5rem;
margin: 1rem;
min-height: 15rem;
background: linear-gradient(
to right,
#314755,
#26a0da
); /* Default Background */
box-shadow: 8px 7px 10px rgba(0, 0, 0, 0.5);
display: flex;
overflow-x: scroll; /* We should able scroll on x coordinates */
overflow-y: hidden;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch; /* For mobile */
-ms-overflow-style: none; /* For hide scrollbar */
scrollbar-width: none; /* For hide scrollbar */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment