Platzhalter für contenteditable Attribute
HTML & CSS
Platzhalter für den contenteditable Attribut erstellen:
<style>
[contentEditable=true]:empty:before{
content: attr(data-placeholder);
color: #cccccc;
}
/*
or with class
*/
.content:empty:before{
content: attr(data-placeholder);
color: #cccccc;
}
</style>
<div class=„content“ contenteditable="true" data-placeholder="Placeholder"></div>
Mit der Nutzung unserer Dienste erklären Sie sich damit einverstanden, dass wir Cookies verwenden.
Datenschutzerklärung
Alexander Naumov
Contao Freelancer, PHP Entwickler und Web Allrounder