CSS attribute overflow-wrap

Definition and Usage

overflow-wrap The property specifies whether the browser can wrap long words when they overflow the container.

Example

Allows the browser to wrap long words when they overflow the container:

div {
  overflow-wrap: break-word;
}

Try It Yourself

CSS Syntax

overflow-wrap: normal|anywhere|break-word|initial|inherit;

Property Value

Value Description
normal Long words do not break to a new line, even if they overflow the container. Default value.
anywhere Breaks words if they overflow the container.
break-word Breaks words if they overflow the container.
initial Sets this property to its default value. See: initial.
inherit Inherits this property from its parent element. See: inherit.

Technical Details

Default Value: normal
Inheritance: Yes
Animation Production: Not supported. See:Animation-related properties.
Version: CSS3
JavaScript Syntax: object.style.overflowWrap="normal"

Browser Support

The numbers in the table represent the browser version that first fully supports this property.

Chrome Edge Firefox Safari Opera
23.0 18.0 49.0 6.1 12.1

Σχετικές σελίδες

Εκμάθηση:CSS παροχή