想要在div属性contenteditable中实现 placeholder提示,可使用一下方法
<div class='box' contenteditable placeholder='请输入'></div>
<style>
.box:empty::before {content: attr(placeholder);}
</style>
<div class='box' contenteditable placeholder='请输入'></div>
<style>
.box:empty::before {content: attr(placeholder);}
</style>