如何设置HTML5表单验证消息的样式? [英] How to style the HTML5 form validation messages?

查看:44
本文介绍了如何设置HTML5表单验证消息的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HTML5验证必需"但是气泡消息正在我的屏幕上创建滚动条,因为输入字段的大小很小并且在右侧.

I am using HTML5 validation "required" but bubble message is creating scrollbar in my screen because input field size is small and on right side.

所以我想更改气泡消息以在输入字段的左侧显示或更改其样式.

So I want to change the bubble message to display left side to input field or change the style of it.

HTML5表单

 <form>
  <input type="text" required value="" style="float:right"/>
  <input type="submit" value="Submit" />
</form>

http://jsfiddle.net/bhumi/4ty922h9/

如何更改消息显示样式?

How can I change the message display style?

推荐答案

显然,所有网络浏览器都不允许自定义验证气泡.Chrome曾经但曾经删除过它.对其进行处理的唯一方法是完全消除气泡并自己制作.此链接可能会有所帮助.

Apparently all web-browsers don't allow customization for validation bubbles. Chrome used to but removed it. The only way to do something about it is to remove the bubble completely and make your own. This link may be of help.

这篇关于如何设置HTML5表单验证消息的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆