【网摘】模仿 placeholder 属性
/*为空时显示 element attribute content*/ .project-task-edit .subtask-body-txt:empty:before { content: attr(placeholder); color: #eee; } .project-task-edit .subtask-body-txt:not:empty:before { content: ''; color: #eee; } /*焦点时内容为空*/ .subtask-body-txt:focus:before { content: none; }