使用 jQuery 验证插件时更改突出显示文本框的颜色?

发布于 2024-09-18 04:33:01 字数 331 浏览 2 评论 0原文

我刚刚尝试了 jQuery 验证插件,当我单击文本框时,它会以棕色/米色突出显示,如何将其更改为另一种颜色?

http://docs.jquery.com/Plugins/Validation#Validate_forms_like_you.27ve_never_been_validating_before。 21

提前致谢。

I just tried out the jQuery Validation Plugin and when I click in a textbox it gets highlighted with a brownish/beige color, how can I change this to another color?

http://docs.jquery.com/Plugins/Validation#Validate_forms_like_you.27ve_never_been_validating_before.21

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风渺 2024-09-25 04:33:01

我不相信插件应用了大纲。焦点输入上的浅黄色是 Chrome 默认样式表的一部分。如果要删除轮廓,请使用以下 CSS 规则:

input:focus {
    outline: 0;
}

其语法与 border 属性的语法相同。但是,您仍然应该尝试为焦点元素提供某种突出显示,以便于访问。

I don't believe that the outline is applied by the plugin. The light yellow color on focused inputs is part of Chrome's default stylesheet. If you want to remove the outline, use this CSS rule:

input:focus {
    outline: 0;
}

The syntax for this is the same as that for the border property. However, you should still try to give focused elements some sort of highlighting, for accessibility.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文