I'm studying a little bit css/html/bootstrap and I was wandering why, in this example, the text inside the <pre>
is not wrapped correctly and the horizontal scroll bar is added.
Is there a way to remove it and fit all the content in a better way?
Please take a look also to the following image. Thanks and regards
答案 0 :(得分:2)
pre {
white-space: pre-wrap; /* Since CSS 2.1 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}