【问题标题】:iPhone submit button not displaying proper CSS decorationiPhone提交按钮未显示正确的CSS装饰
【发布时间】:2014-02-09 05:23:33
【问题描述】:

我有一个移动网络应用程序,它的按钮栏使用方形扁平按钮和扁平圆形端盖。有些按钮是链接,有些是提交按钮,它们的设计看起来相同。在 android 设备上一切看起来都很完美,但在 iPhone (iOS7) 上似乎忽略了一些 CSS,出现 3-D 圆角。我使用以下类设计了按钮:

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

【问题讨论】:

  • 如果您复制并粘贴了 css,则您在 font-size 之后缺少一个冒号...

标签: android html ios css iphone


【解决方案1】:

iOS 样式形成项目的方式大不相同,您可以通过添加-webkit-appearance: none; 来解决大部分问题。 这样的事情应该可以解决它:

.submit_button_green input {
  -webkit-appearance: none; /* initial fix */
  height: 26px;
  width: 61px;
  border: 0;
  font-size: 14px; /* you have a error here */
  color: #FFF;
  background-color: #00CC33;
  font-weight: bold;
  margin-top: -4px; /* and here, -4 what? px? */
  text-shadow: 0px 2px 2px #333;
  border-radius: 0; /* remove rounded corners */
}

【讨论】:

    【解决方案2】:

    可能的错字。 font-size 后缺少冒号

    font-size: 14px;
    

    检查一下

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-01
      • 1970-01-01
      • 2021-03-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多