How to use CSS to make text appear when hovering over a div.
By using the :hover pseudo-class, one can show and hide text on hover using CSS. In the demos below, I’m using the hover pseudo-class along with the background and text color attributes.
Hide Text Until Hover
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Dad Jokes
If Dr. Pepper was a doctor, what kind of doctor would he be?
He would be a fizzician.
Why do crabs never give to charity?
Because they’re shellfish..
Why did the elephant have three red tennis shoes and one yellow shoe?
Because he forgot to lift his leg!
Text Module Content
<strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's <span class="blur-text">standard dummy text</span> ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
<style type="text/css">
span.blur-text{
transition: 0.25s filter linear;
filter: blur(8px);
}
span.blur-text:hover{filter: blur(0px);}
</style>
Note
The CSS can be added via the Text Module’s Advanced tab.
Step 1) Under CSS ID & Classes, add your class. In this example enter “blur-text” without the quotes.
Step 2) Under custom CSS, add your CSS. In this example you would add:
span.blur-text{
transition: 0.25s filter linear;
filter: blur(8px);
}
span.blur-text:hover{filter: blur(0px);}
Text Module Content
<h2>Dad Jokes</h2>
If <strong>Dr. Pepper</strong> was a doctor, what kind of doctor would he be?
He would be a <span class="obscure-text">fizzician</span>.
Why do crabs never give to charity?
Because <span class="obscure-text">they’re shellfish.</span>.
Why did the elephant have three red tennis shoes and one yellow shoe?
Because he <span class="obscure-text">forgot to lift his leg</span>!
<style type="text/css">
span.obscure-text{
transition: all .2s ease-in;
background: #666;
}
span.obscure-text:hover{background: transparent;}
</style>
Grab WordPress Featured Image URL
ften I find myself working with WordPress themes where I need to do something with the featured image. The WordPress Featured Image is a great tool where ones pages and posts can be easily illustrated with a pre-configured display of any selected...
Real Estate Real World Calculators
riginally designed for the Elegant Estate Real Estate WordPress theme, this calculator package will work for any website or WordPress theme. See in action here: http://realestatecambria.com Click on the Calculators link in the sidebar. [button...
Responsive Web Design
Remember the website days past, where to have the coolest website it would have to have some stunning Flash animation flying around on the screen. Those days are long gone. Today the landscape is shifting, yes, more quickly than we can keep...
Flash is a twenty year veteran of the internet (and the Air Force); married to Jan for over thirty years; blessed with two fine boys Zac and Max.