Ravi Kumar Profile picture
Jan 18 13 tweets 5 min read
Do you know about CSS Scroll-Snap?

🧵👇
1⃣. What is CSS scroll-snap?

1. It is a CSS property that helps you to make your page more accessible to all devices.

2. Helps you to make more user-friendly websites

Example👇
2⃣. How to Implement

1. To use scroll snap on a container, its child items should be displayed inline.

2. We can use the flexbox property for that.

3. Define the scroll-snap type.

Syntax :
scroll-snap-type: none | [ x | y | block | inline | both ] [ mandatory | proximity]
3⃣. Scroll-snap type

Directions: We can give the directions for scrolling

1. scroll-snap-type-x: this will create the scrolling bar in the horizontal directions.

2. scroll-snap-type-y: this will create the scrolling bar in the vertical directions.

Example👇
4⃣ Scroll-snap type

1. Strictness: we can control the strictness of the scroll bar and the values to control scroll bare are:
mandatory | proximity

2. strictness helps to control the effectiveness of the scroll bar where sometimes scrolling doesn't happen.
5⃣ Scroll-snap-type: mandatory

mandatory is a strictness value that tells the browser to always go to a snap position when there isn’t scrolling happening.

Example👇
6⃣ Scroll-snap-type: Proximity

Proximity is a strictness value that tells the browser to go to a snap position if a scrolling action gets pretty close to a snap position.

If it’s not pretty close, then the browser shouldn’t snap and scrolling will behave normally.

Example👇
7⃣ Scroll Snapping Alignment

The child items of the scrolling container need an alignment point that they can snap to. We can use start, centre or end.

Example👇
8⃣ Scroll-Snap-Stop

Sometimes, we might need to prevent the user from accidentally bypassing some important items while scrolling. If the user scrolls too quickly, it is possible to skip some items.

Example👇
9⃣ Scroll Snap Padding

The scroll-padding shorthand property sets scroll padding on all sides, similar to how the padding property works.

Example👇
🔟Scroll Snap Margin
The scroll-margin shorthand property sets the spacing between the child items of a scrolling container. When a margin is added to an element, the scrolling will snap as per the margin.

Example👇
1⃣1⃣ Bonus💡

Use Cases For CSS Scroll Snap

1. Images List

2. Friends List

3. Avatars List

4. Full Height Sections

Example👇
Thanks for reading the whole thread♥️

if you find these threads useful, retweet for more reach!

link to first thread🔗👇

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Ravi Kumar

Ravi Kumar Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ravikmmr

Aug 7, 2021
Do you know about HTML layout ??

🧵👇 Image
1⃣ Introduction of HTML layout

HTML layout is used to structure a web page in a proper manner so it looks better and gives a proper responsive web page.

It helps users easy to navigate the web page and it easily makes by using standard Html tags. Image
2⃣ Why it is used ??

1. It Simplifies navigation by clarifying the structure.

2. It Makes the design more visually appealing.

3. It helps to make the page in a more responsive form.

4. helps users to easily navigate the web page.
Read 8 tweets
Aug 5, 2021
Top Five udemy courses for web development 💯😎

🧵👇

some of the best list of courses that helps you to get started in the world of front-end development.

many people DM me where to start so these are courses for them who want to start or brush up their skills!!
01. The Complete 2021 Web Development Bootcamp

this course is created by @yu_angela, This course gives you a brief intro about the web development world, she discusses the full stack development this is the best course to get started

🔗🔗

udemy.com/course/the-com…
02. The Web Developer Bootcamp 2021

This course is created by colt Steele, he covers all the topics related to web development so goes and start!!

🔗🔗

udemy.com/course/the-web…
Read 7 tweets
Aug 4, 2021
Quick cheat sheet 😎💯

🧵🧵👇👇

HTML, CSS & GIT cheat sheet for a quick revision for interviews and it also helps to memorize all the concept
01. GIT Cheatsheet

In this GIT cheat sheet, there are some important GIT commands that you should definitely know!

👇👇
Read 4 tweets
Aug 1, 2021
Top 6 Website to practice Your Frontend Skills💪😎

If you want to improve your frontend skills and want to check your knowledge then check out this thread

🧵🧵👇👇
01. Fronted Mentor

Improve your front-end skills by building real projects. Solve real-world HTML, CSS, and JavaScript challenges whilst working on professional designs.

👇👇

frontendmentor.io/challenges
02. javascript30

30 Day Vanilla JS Coding Challenge

Build 30 things in 30 days with 30 tutorials

👇👇

javascript30.com
Read 7 tweets
Jul 31, 2021
Top 5 playlist for Web Development in the Hindi language for FREE😀♥️

many people asked me to make a list of playlists so they can learn in the Hindi language.

🧵🧵👇👇 Image
01. Code with Harry

This playlist covers Web development from scratch
if you didn't know anything about web development you start with this playlist

👇👇

youtube.com/c/CodeWithHarr…
02. Thapa technical

He has a wide range of playlists for the developers
he covers all the topics of web development. So you can start with easily

👇👇

youtube.com/c/ThapaTechnic…
Read 7 tweets
Jul 30, 2021
Top Youtube playlist for web development where you can learn for free.

A Mega thread

🧵🧵👇👇 Image
01. Traversy Media

In this playlist, you can learn all about web development he has a bunch of things and guest creators from all over the world so try this.

youtube.com/c/TraversyMedi…
02. freeCodeCamp

One of the biggest learning platforms in the world it has very good web development courses available and also you can learn new things from these courses.

youtube.com/c/Freecodecamp…
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(