首页 \ 问答 \ HTML5和CSS3在元素焦点上显示表单提示(HTML5 and CSS3 show form hints on element focus)

HTML5和CSS3在元素焦点上显示表单提示(HTML5 and CSS3 show form hints on element focus)

我正在建立一个HTML5和CSS3网站,我正在寻找创建窗体字段的表单提示,以显示该字段有:focus我想这样做没有javascript是可能的,下面是我的表单标记。

<label for="username">Username</label>  
<input type="text" name="username" value=""/>
<div class="message">You need a username that is more than 5 letters long</div>

是否有可能显示.message当用户名输入有:focus只使用CSS3中的伪类?


I am building a website in HTML5 and CSS3, I am looking to create form hints for form fields that show the the field has :focus I would like to do this without javascript is this possible, below is my form markup.

<label for="username">Username</label>  
<input type="text" name="username" value=""/>
<div class="message">You need a username that is more than 5 letters long</div>

Is it possible to show .message when the username input has :focus using just psuedo classes in CSS3?


原文:https://stackoverflow.com/questions/5593500
更新时间:2022-10-25 19:10

最满意答案

您可以使用PREPARE功能执行动态SQL。


You can use the PREPARE feature to execute dynamic SQL.

相关问答

更多