0

当我在 IE8 兼容模式下尝试以下代码时,滚动条隐藏了内容。

<style>
.myclass {
    overflow: auto;
    width: 400px;
}
</style>
<div class="myclass">
ReallyLongTextHere123456789012345678901234567890123456789012345678901234567890
</div>

这只发生在没有空格的长字符串时。其他浏览器和较新版本的 IE8 可以正确显示。

有没有办法在不影响它在其他浏览器上的外观的情况下解决这个问题?

4

1 回答 1

1
.myclass {
    overflow: auto;
    width: 400px;
word-wrap:break-word;
}

像这样修改你的CSS。

于 2013-04-08T04:46:59.147 回答