Home
CSS
CSS Text Effects
Tryit: Using text-overflow with hover
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> div.test { white-space: nowrap; width: 200px; overflow: hidden; border: 1px solid #000000; } div.test:hover { overflow: visible; } </style> </head> <body> <p>Hover over the two divs below, to see the entire text.</p> <div class="test" style="text-overflow:ellipsis;">This is some long text that will not fit in the box</div> <br> <div class="test" style="text-overflow:clip;">This is some long text that will not fit in the box</div> </body> </html>