значения свойства:
div {
width
:
300px
;
height
70px
border
1px
solid
#8E8E8E
}
.a {
white-space
normal
.c {
pre
div { width: 300px; height: 70px; border: 1px solid #8E8E8E; } .a { white-space: normal; } .c { white-space: pre; }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
link
href
"css/style.css"
rel
"stylesheet"
script
type
"text/javascript"
src
"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
></
</
body
div
class
"a"
I was dreaming about Hawaii. I was dreaming about my holiday. In
my dream, I was on the beach in Hawaii.
br
id
"div1"
"b"
I was dreaming about Hawaii. I was dreaming about my holiday.<
/> In
"c"
Hello
World!
/*JavaScript*/
document.getElementById("div1").style.whiteSpace = "nowrap";
/*jQuery*/
$(document).ready(function () {
$(".b").css({ "white-space": "nowrap" });
});