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>

  

猜你喜欢

转载自www.cnblogs.com/caoruichun/p/10753946.html
div