WebKit连字 [英] WebKit Hyphenation

查看:125
本文介绍了WebKit连字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人成功地在任何WebKit浏览器中实现连字?我尝试了CSS3 连字符样式以及 -webkit-hyphens:auto 。没有任何骰子。



注意:我只在Mac上试过Safari和Chrome。



更新:代码示例

 < html& 
< head>
< style>
div {
-webkit-hyphens:auto;
}
< / style>
< / head>
< body>
< div style =width:150px; border:solid 1px black;>
< p> Anaideia,无情,无耻和无耻的精神< / p>
< p>超级扁桃体癣,抗变形性痴呆,絮凝性嗜脂细胞增多症,髋关节炎性窒息性心律失常< / p>
< / div>
< / body>
< / html>


解决方案

-webkit-hyphens在iOS 4.2及更高版本





< /i.stack.imgur.com/xLcOh.pngalt =Webkit>



iOS 4.3:




Has anyone successfully been able to implement hyphenation in any of the WebKit browsers? I've tried the CSS3 hyphenation style as well as -webkit-hyphens: auto. No dice for either of those. Or maybe I'm doing something wrong?

Note: I've only tried Safari and Chrome on a Mac.

Update: Code example

<html>
  <head>
    <style>
      div {
        -webkit-hyphens: auto;
      }
    </style>
  </head>
  <body>
     <div style="width: 150px; border: solid 1px black;">
       <p>Anaideia, spirit of ruthlessness, shamelessness, and unforgivingness</p>
       <p>Supercalifragilisticexpialidocious, Antidisestablishmentarianism, Floccinaucinihilipilification, Hippopotomonstrosesquipedaliophobia</p>
     </div>
  </body>
</html>

解决方案

-webkit-hyphens works fine on iOS 4.2 and above, and is partially supported in the webkit nightlies.

Webkit:

iOS 4.3:

这篇关于WebKit连字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆