Kaigai Blog living abroad in my twenties

【My Study Note】Text Effects

CSS Programming

Text Effects

white-space

p.a {
  white-space: nowrap || normal;
}
  • nowrap: Sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a <br> tag is encountered
  • normal: Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default

text-overflow

div {
  text-overflow: ellipsis || clip;
}

The text-overflow property specifies how overflowed content that is not displayed should be signaled to the user.

  • clip: Default value. The text is clipped and not accessible
  • ellipsis: Render an ellipsis (“…”) to represent the clipped text

writing-mode

writing-mode: horizontal-tb|vertical-rl

The writing-mode property specifies whether lines of text are laid out horizontally or vertically.

  • horizontal-tb: Let the content flow horizontally from left to right, vertically from top to bottom
  • vertical-rl: Let the content flow vertically from top to bottom, horizontally from right to left

word-wrap

word-wrap: normal|break-word

The word-wrap property allows long words to be able to be broken and wrap onto the next line.

  • normal: Break words only at allowed break points. This is default
  • break-word: Allows unbreakable words to be broken