iOS 设置输入类型样式 ="file"

标签 ios css mobile-webkit

我正在尝试使用 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/

相关文章:

iphone - Interface Builder 文件中的未知类 <MyViewController> + 本地化问题

html - 无法在移动 Safari/Chrome 上为 SELECT OPTION 设置 CSS 样式

javascript - Android 浏览器 - Javascript window.innerWidth 返回错误值

ios - 在 gridview 中滚动时字体大小发生变化

iphone - 如何通过 facebook API 在 friend 的墙上同时发布文本、图像和链接

css - 为什么填充有效地创建了最小宽度和最小高度,即使将 box-sizing 设置为 border-box,以及如何处理它?

html - Bootstrap 中心表单

css - 使主窗口水平滚动

css - 背景总是填满浏览器窗口,即使在移动浏览器上也是如此?

ios - 试图从 Objective-C 转向 Swift VC