如何创建在聚焦时在右侧显示提示的文本框?
示例:http://www.airbnb.com/rooms/new (单击地址文本框)
发布于 2010-01-13 23:15:12
没有javascript也是可能的。
<input type="text" value="Focus me to see a hint!" style="width: 200px; height: 30px;"/>
<div>Congratulations, you found me !</div>.input + div {
display: none;
position: relative;
top: -30px;
left: 200px;
}
.input:focus + div {
display: block;
}享受;)
发布于 2013-06-18 23:11:19
它的占位符很简单
<input type="text" placeholder = "your gray text" />https://stackoverflow.com/questions/2057370
复制相似问题