Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Johan Rönkkö
Johan Rönkkö
28,054 Points

Text that fades... but on-click the hole text is visible?

The idea is: The website only show about 3 sentences of a paragraph then the text fades away. But when you click on the div which contain the paragraphs, it drops down and show you the hole text. I've seen this on several sites and thought it looked really cool. It also provides you with not having to bother scrolling down so much on a website to find information your searching for. ... I wonder, can you learn this on treehouse? Does this styling technique have a name? Or simply, how do you do this?

Per Karlsson
Per Karlsson
12,683 Points

Couldn't you do it with some JS and CSS. Transitions with delay, onclick move the "cover" downwards to show the rest of the text etc.

1 Answer

through javascript/Jquery or sass mixed up with transitions, check the javascript course, you will love it