{"success":true,"code":0,"msg":"","data":{"themeEx":{"tid":54,"replies":0,"views":4260,"searchs":3,"topGmtUpdate":null,"top":false},"theme":{"id":54,"title":"对DIV做placeholder效果","content":"
当DIV加上contenteditable="true"作textarea用时,光写placeholder是没有效果的。
.prefix_content:empty:before{\n content: attr(placeholder);\n color:#bbb;\n}\n.prefix_content:focus:before{\n content:none;\n}
加上以上代码后,placeholder就生效了