Languages
[Edit]
EN

CSS - show text on hover

3 points
Created by:
Saim-Mccullough
688

In this article, we would like to show you how to show text on hover using CSS.

Simple steps:

  1. create two elements: div.container and div.text (inside div.container),
  2. set div.text element as invisible by default using display: none property,
  3. add :hover pseudo-class for div.container element defining display: block property on div.text.

Practical example:

 

See also

Edit
  1. JavaScript - show text on hover

References

Edit
  1. :hover - CSS: Cascading Style Sheets | MDN
  2. Pseudo-classes - CSS: Cascading Style Sheets | MDN

Alternative titles

  1. CSS - show text on parent element hover
  2. CSS - reveal text on parent element hover
  3. CSS - text show up on parent element hover
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join