There is no simple way to do this, HTML just doesn't have functionality for that out of the box. You're going to have to use some "tricks" involving overlay divs and such. This is why I don't do front end coding; I hate it.
JS stuff can only manipulate HTML and CSS, it cant do anything that HTML and CSS couldn't do without it. JS just automates the process and can put logic behind it. Any JS stuff would involve the same tricks, perhaps with a little more complication.
I think I understand your question now. :-) Okay, I can't answer your question, but here's what I got:
I believe that WordPress is using this feature in the visual editor. I don't know how they've done it, but it seems to me that it's using javascript to transform to transform the html code.
Maybe you can find the javascript code, I couldn't find it.