开发者

Garbled text in iOS 3.2 inside webapp

I'm having an issue with a webapp I'm writing f开发者_JAVA技巧or iOS devices. It only manifests itself in iOS 3.x.

Below is the problem I'm having:

Garbled text in iOS 3.2 inside webapp

The computed style is:

-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;

This is a normal input field inside a table row.

Any ideas of what's happening?


Safari uses sub-pixel rendering to "bulk up" text, as of Snow Leopard, their standard "fix" no longer worked. For Safari 4/Snow Leopard, use text-shadow, and for everything else, place -webkit-font-smoothing on the body element, like so. body{-webkit-font-smoothing:antialiased}


Maybe you can fix it by using

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

The first shadow functions as a "background" for the clotted text.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜