{
content: attr(data-placeholder);
font-style: italic;
opacity: .75;
}[/sourcecode]
… And the Markup:
[sourcecode language=”css”]<div contenteditable data-placeholder="Add some text…"></div>[/sourcecode]
If you are interested in more CSS3, HTML5 WebComponents and JavaScript stuff, make sure you check my experiments website.
© 2006 - 2023 Martin Ivanov