我正在尝试使用 css 设置输入样式,以在 iOS 上以相同的方式显示,而不使用它应用的默认 iOS 输入样式。
<input name="t1" class="imgupload" type="file" accept="image/*" capture="camera">
input[type='file'] {
background: rgb(0, 0, 0);
border-radius: 5px;
color: rgb(255, 255, 255);
font-family: 'Lucida Grande';
padding: 0px 0px 0px 0px;
font-size: 16px;
margin-bottom: 20px;
width: 210px;
vertical-align: top;
margin-top: -2px;
}
是否有特定的 -webkit 类来禁用默认样式。
最佳答案
您需要添加-webkit-appearance: none;
关于iOS 设置输入类型样式 ="file",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16751488/