html - Edge 和 chrome 中必填字段验证器的不同行为?

标签 html css microsoft-edge

enter image description here No red color is coming

red box is coming outside the text box.

如何保持一致?要么两者都应该有颜色,要么都没有。

<form action="">
    <input id="email" type="email" required="required" />
    <input type="submit" id="btnSubmit" />
</form>

最佳答案

如果验证失败,Microsoft Edge 会为输入提供一个 outline 属性。您可以像这样重置它:

#email2 {
  outline: 0;
}
<form action="">
    Email: <input id="email" type="email" required="required" />
    Confirm Email: <input id="email2" type="email" required="required" />
    <input type="submit" id="btnSubmit" />
</form>

关于html - Edge 和 chrome 中必填字段验证器的不同行为?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39578674/

相关文章:

html - Joomla 烦人的页脚

html - 输入类型 hidden 添加了一个中断。我如何删除它们?

css - 如何在ie中 float body

Angular 动画在 IE edge 中不起作用

html - 为什么我的输入框被强制到另一行?

html - 使 CSS 悬停工具提示超出其父边界

javascript - 参数无效 - Edge 浏览器中的 Google map 错误

javascript - Microsoft Edge 扩展上下文菜单未出现

javascript - 如何找到具有相同类名的其他 div 并关闭它们

asp.net - 将 Css 与 Asp.net 菜单一起使用(HoverStyle 未生效)