html - CSS input.submit 在移动设备中被否决
问题描述
我的 input.sumbit 有以下 CSS,效果很好。
//css
input.digipas {
width: 176px;
height: 48px;
margin-top: 10px;
margin-bottom: 10px;
background-color: #ef4969;
font-family: 'Open Sans', sans-serif;
font-size: 14px;
font-weight: bold;
font-style: normal;
font-stretch: normal;
line-height: 1.71;
letter-spacing: normal;
text-align: center;
color: #ffffff;
border-radius: 4px;
cursor: pointer;
box-shadow: none;
border: none;
}
//html
<input type="submit" class="digipas" name="submit" value="Valider">
它在我的网站上显示如下:https
://imgur.com/u3YwjFV
不幸的是,在移动设备上,css 被一些我不知道的奇怪力量所推翻:https
://imgur.com/ow2mqez
我该如何解决这个问题?!
解决方案
我找到了答案。我只是将以下代码放入元素 css,它解决了问题。顺便说一句,奇怪的布局是在 iPhone 上引起的。
-webkit-appearance: none;
推荐阅读
- javascript - jQuery UI - 下载后,jQuery 不起作用
- node.js - 多核处理器上的 Node Js
- javascript - 删除项目reducer时无法读取react-redux中未定义的属性'map'
- java - 单元测试在 Maven 中失败,但在 Intelij Idea 中失败
- google-apps-script - 在整个工作表中搜索值并基于它删除的脚本
- java - 记录字段期间出现一些异常 java.lang.RuntimeException:记录字段期间出现一些异常
- swift - 如何为场景添加标签?(场景套件)
- r - 我的图表的标题是重叠的。我怎样才能解决这个问题?
- ios - 使用堆栈视图时,我的应用在 Main.storyboard 中的外观与在模拟器中的不同
- javascript - 如何禁用箭头键?