【问题标题】:Garbled text in iOS 3.2 inside webappiOS 3.2 中的 webapp 内出现乱码
【发布时间】:2010-12-19 21:01:51
【问题描述】:

我为 iOS 设备编写的 web 应用程序出现问题。它只在 iOS 3.x 中表现出来。

以下是我遇到的问题:

计算出来的样式是:

-webkit-appearance: none;
-webkit-background-clip: padding-box;
-webkit-border-horizontal-spacing: 2px;
-webkit-border-vertical-spacing: 2px;
-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 1px 4px 0px inset;
-webkit-rtl-ordering: logical;
-webkit-user-select: text;
background-attachment: scroll;
background-clip: padding-box;
background-color: #F0F0F0;
background-image: none;
background-origin: padding-box;
border-bottom-color: #B3B3B3;
border-bottom-left-radius: 9px;
border-bottom-right-radius: 9px;
border-bottom-style: solid;
border-bottom-width: 1px;
border-collapse: collapse;
border-left-color: #B3B3B3;
border-left-style: solid;
border-left-width: 1px;
border-right-color: #B3B3B3;
border-right-style: solid;
border-right-width: 1px;
border-top-color: #B3B3B3;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
border-top-style: solid;
border-top-width: 1px;
color: #333;
cursor: auto;
display: inline-block;
font-family: Helvetica, Arial, sans-serif;
font-size: 16px;
font-style: normal;
font-variant: normal;
font-weight: normal;
height: 22px;
letter-spacing: normal;
line-height: 22px;
margin-bottom: 2px;
margin-left: 0px;
margin-right: 0px;
margin-top: 2px;
padding-bottom: 6px;
padding-left: 6px;
padding-right: 6px;
padding-top: 6px;
text-align: auto;
text-indent: 0px;
text-shadow: white 0px 1px 0px;
text-transform: none;
width: 378px;
word-spacing: 0px;

这是表格行内的普通输入字段。

对正在发生的事情有任何想法吗?

【问题讨论】:

    标签: css ios webkit mobile-webkit ios3.0


    【解决方案1】:

    Safari 使用亚像素渲染来“放大”文本,从 Snow Leopard 开始,它们的标准“修复”不再有效。对于 Safari 4/Snow Leopard,使用 text-shadow,对于其他所有内容,将 -webkit-font-smoothing 放在 body 元素上,就像这样。 正文{-webkit-font-smoothing:antialiased}

    【讨论】:

    • 没有解决问题。还是谢谢。
    【解决方案2】:

    也许你可以通过使用来修复它

    text-shadow: #333 0 0 0, white 0 1px 0;
    

    第一个阴影用作凝结文本的“背景”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-30
      • 2020-10-05
      • 1970-01-01
      • 2012-09-02
      • 1970-01-01
      • 1970-01-01
      • 2014-05-26
      • 1970-01-01
      相关资源
      最近更新 更多