div 可输入

Posted caoruichun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了div 可输入相关的知识,希望对你有一定的参考价值。

.haveInput{width: 100px;height: 100px;background: red;}
/*输入后删除该class*/
.haveInput:before {content: attr(placeholder);display: block;color: #333;}

  

<div placeholder=‘请输入‘ class="haveInput" contentEditable=‘true‘></div>

  

以上是关于div 可输入的主要内容,如果未能解决你的问题,请参考以下文章