Detailed explanation of the use of whitespace effect attributes in CSS

高洛峰
Release: 2017-03-08 15:26:51
Original
1802 people have browsed it

white-space

white-space is used to set the browser's processing of "blank". The so-called blank refers to the space you enter in the editor. , carriage return, tab, etc. Its optional content is as follows:

normal: Default. White space is ignored by the browser. For example: whitespace at the beginning and end is ignored, no matter how many spaces or carriage returns there are between words, only one space is displayed, and the space before the line break is ignored
pre: Whitespace will be retained by the browser. It behaves like the

tag in HTML. 
nowrap: No line breaks, unless
is encountered, n spaces will be compressed into one.
pre-wrap: Keep all whitespace, but wrap lines normally (chrome, FF, IE8+, Opera), equivalent to normal under IE6 and IE7
pre-line: Combine whitespace sequences (merge into one) , but retain line breaks (chrome, FF, IE8+, Opera), which are equivalent to normal

word-spacing and letter-spacing
word-spacing under IE6 and IE7. It works between words in English, but is invalid for Chinese.
Letter-spacing can work for Chinese.

    
  

This is some text.哈哈哈哈哈哈哈

This is some text.This is some text.

Copy after login

The above is the detailed content of Detailed explanation of the use of whitespace effect attributes in CSS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!