Facebook 评论框在没有输入标签的情况下如何工作?
How does Facebook comment box work without input tag?
我正在检查 facebook 的评论框,令我惊讶的是没有输入标签,只有很多嵌套 div.
任何人都知道它是如何实施的,为什么这种方法比简单的输入标签更好?
here the screen screenshot of me inspecting the comment box
提前致谢
希望它 contenteditable
,显然有一些脚本、验证、编程......
div {
width: 100%;
max-width: 250px;
padding: 5px 10px;
border: 1px solid #666;
outline: 0;
border-radius: 10px;
}
<div contenteditable="true">Am I a input ???</div>
我正在检查 facebook 的评论框,令我惊讶的是没有输入标签,只有很多嵌套 div.
任何人都知道它是如何实施的,为什么这种方法比简单的输入标签更好?
here the screen screenshot of me inspecting the comment box
提前致谢
希望它 contenteditable
,显然有一些脚本、验证、编程......
div {
width: 100%;
max-width: 250px;
padding: 5px 10px;
border: 1px solid #666;
outline: 0;
border-radius: 10px;
}
<div contenteditable="true">Am I a input ???</div>