我在做这个web应用程序。客户端正在iPhone上测试它,并看到输入背后的白色背景。我没有iPhone,但我使用这个仿真器,它也显示白色背景。我试过很多技巧,但仍然有白色背景。另外,当我点击输入时,它周围有蓝色的轮廓,它不应该在那里,因为我显式地删除了大纲。
这就是我在输入中应用的风格。有什么想法吗?
.contact-form .form-control,
.contact-form .form-control:focus,
.contact-form .form-control:focus-visible,
.contact-form .form-control:focus-within,
.contact-form .form-control:active,
.contact-form .form-control:target,
.contact-form .form-control:visited {
-webkit-appearance: none !important;
-moz-appearance: none !important;
appearance: none !important;
background: transparent !important;
background-clip: padding-box !important;
background-image: linear-gradient(transparent,transparent) !important;
background-color: transparent !important;
border: none !important;
outline: none !important;
box-shadow: none !important;
resize: none;
font-size: 1.6rem;
padding-top: 0;
padding-bottom: 0;
line-height: 1.5;
height: auto;
}发布于 2021-10-17 11:44:59
我在我的窗口上安装了Safari (版本5.1.7,被废弃的BTW),并且看到了这个问题。似乎有些选择器在Safari中不受支持,因此它不加载任何选择器。因此,我删除了focus-visible,焦点--在和目标选择器中,现在它按照预期工作。
https://stackoverflow.com/questions/69602132
复制相似问题