【问题标题】:Internet Explorer 11 keeps splitting wordsInternet Explorer 11 不断拆分单词
【发布时间】:2014-01-30 19:54:35
【问题描述】:

Internet explorer 一直在分裂我的话。 Chrome 和 Firefox 运行良好。

这是我的代码和网站链接:http://www.hgsainc.com/about/
感谢您的帮助!

.page #main .entry-content {
    width: 100%;
    padding-right: 0;
    word-wrap: normal;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    hyphens: none;
    table-layout: fixed;  
}

.page #main .entry-content p,
.page #main .entry-content span {
    font-size: 16px;
    line-height: 30px;
    text-align: right;
}

【问题讨论】:

  • 分什么词,能不能具体点?
  • 一个问题应该包含足够的代码(这里是 HTML 和 CSS)来重现问题。一个实时页面的链接不够,因为当问题得到解决后,这个问题对未来的访问者来说就变得毫无意义了。

标签: css split internet-explorer-11 words


【解决方案1】:

我没有查看您的网站,但您似乎需要在您的 CSS 中添加 -ms-hyphens 前缀。你有-webkit-moz 但没有-ms

-ms-hyphens: none;

查看这里了解更多信息:http://msdn.microsoft.com/en-us/library/ie/hh771871(v=vs.85).aspx

另外,经过进一步研究,Opera 似乎不支持此功能,大多数移动浏览器也不支持:http://caniuse.com/css-hyphens - 请注意,以防您在路上遇到这种情况。

【讨论】:

  • 谢谢,您解决了!感谢您的帮助!
【解决方案2】:

在 Internet Explorer 中检查开发人员工具后,检查出现此问题的段落在您的代码中显示 -ms-hyphens:auto; 样式。您可能应该将带有-ms-hyphens:auto; 的样式添加到您的样式块中,以防止这种情况发生。

导致这种情况的样式位于http://www.hgsainc.com/wp-content/themes/twentythirteen/style.css* 5.3 Entry Content 部分。您还可以从那里删除 hyphens 样式以防止必须这样做。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-04
    • 1970-01-01
    • 2023-04-06
    • 2019-11-20
    • 2015-01-27
    相关资源
    最近更新 更多