.myclass {
overflow: auto;
width: 400px;
word-wrap:break-word;
}
Modify your css like this.
题
When I try the following code in IE8 compatibility mode, the scroll bar hides the content.
<style>
.myclass {
overflow: auto;
width: 400px;
}
</style>
<div class="myclass">
ReallyLongTextHere123456789012345678901234567890123456789012345678901234567890
</div>
This only happens when there is a long string with no spaces. Other browsers and newer versions of IE8 display this correctly.
Is there a way to fix this issue without affecting the way it looks on other browsers?
解决方案
.myclass {
overflow: auto;
width: 400px;
word-wrap:break-word;
}
Modify your css like this.