The front-end time project version iterations, when the code was modified, was found to have used about word-spacing and letter-spacing. First of all, the use of the scene, the previous project, often encountered some characters between some spacing, I saw some colleagues of the code is so implemented:
<p> for </p>
if the distance is wider than a space, then add a few more, this method, although feasible, always feel that it is too violent, so I used CSS to achieve this effect, but also encountered in the middle of some problems previously not noticed, that's the difference between word-spacing and letter-spacing.
start oneself also want very simple, so direct use p{word-spacing:10px;}, and then directly embarrassed, without any effect, The main reason is still no scrutiny two differences between the first look at its syntax.
Letter-spacing
Syntax:
letter-spacing:normal | length
Parameters:
Normal: Default interval
Length: A value consisting of a floating-point number and a unit identifier that is allowed to be negative. See Length units
Description:
retrieves or sets the interval between the text in an object.
This property adds the specified interval to each text, but the last word is excluded.
the corresponding script attribute is letterspacing.
Word-spacing
Syntax:
word-spacing:normal | length
Parameters:
Normal: Default spacing
Length: A value consisting of a floating-point number and a unit identifier that is allowed to be negative. See Length units
Description:
retrieves or sets the number of spaces inserted between words in an object. Available only on Mac platforms for ie4+.
the corresponding script attribute is wordspacing.
Sum up: letter-spacing is the white space between each character, Word-spacing is the white space between the words,
The other has no effect, so the above is good explanation, Chinese characters under the word-spacing is no effect, so can only use letter-spacing.
CSS Common Properties Summary: The use of word-spacing and letter-spacing