Pratham Profile picture
I work to place you in the top 1% of web developers • Building https://t.co/TzoPPvXkeN & https://t.co/vTZdsutbrT • DevRel • Prev @Rapid_API @HyperspaceAI

May 17, 2021, 7 tweets

Have you heard the term "Tooltip" in web development?

Tooltips guide your visitors to take action and hence provides extra layer of guidance without any difficulties and hence increase the user experience

Let's create a tooltip using HTML and CSS only 🧵👇🏻

We just need to create an element that we will be visible only when user moves the mouse pointer over an elment

STEP1: Let's start with the HTML structure

STEP2: Popup text

- Add some width and padding
- Hide the popup element throughout and show it only on hover
- Place it above the element
- Add little transition for smooth rendering

STEP3: Create Arrow

- Creating a triangle
- Place it at the center

Great so far! Now we just need to show the popup text when mouse over an element.

That's it! It will hardly take any time but these small things can make you a stand out developer.

If you like this thread, share it with your connections it means a lot to me ❤️

Peace out 😉

Check out the source code here: codepen.io/prathkum/pen/o…

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling