android - 无法在 iPhone 上获得完美的方形提交按钮。此外,按钮文本不居中

标签 android ios css

<分区>

我有一个基于网络的移动应用程序,它使用使用以下 CSS 类设置样式的提交按钮:

.submit_button_green input {
height: 26px;
width: 61px;
border: 0px solid;
font-size: 14px;
color: fff;
background-color: #00CC33;
font-weight: bold;
margin-top: -4px;
text-shadow: 0px 2px 2px #333;
text-align: center;
-webkit-appearance: none;
}

在 iPhone 4 (iOS7) 上,边 Angular 仍然是圆 Angular ,按钮文本位于右侧(从按钮右侧消失)。在安卓设备上,按钮是完美的。

最佳答案

此问题已得到解答several times已经。首先将 -webkit-appearance 设置为 none:

input {
    -webkit-appearance: none;
}

然后设置 border-radius 为 0:

input {
    -webkit-appearance: none;
    border-radius: 0;
}

关于android - 无法在 iPhone 上获得完美的方形提交按钮。此外,按钮文本不居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21652567/

相关文章:

android - IllegalStateException 调用 MediaPlayer.reset()

Android:ImageView 旋转比例

ios - UIViewController 的委托(delegate)函数决定弹出

html - 将表头与 Firefox 中的其他表体对齐

android - 尝试在 css 中绘制图像

android - 当您上传未使用上传证书签名的 APK 时;你必须使用相同的证书吗?

android - Eclipse 中的 Joda 时间 : NoClassDefFoundError

iphone - UITableViewCell 中的 UITextField

ios - 为什么我在一个 Xcode 安装中看到以下警告,而在另一个安装中却看不到?

javascript - Angular : switch HTML depending on screen resolution