首页 > 解决方案 > 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 我该如何解决这个问题?!

标签: htmlcss

解决方案


我找到了答案。我只是将以下代码放入元素 css,它解决了问题。顺便说一句,奇怪的布局是在 iPhone 上引起的。

-webkit-appearance: none;

推荐阅读