1. Custom text selection style (IE8 and below are not supported)
:: Selection {color:#9400D3; background:#A9A9A9;} ::-moz-selection {color:#9400D3; background:#A9A9A9;}
2. Interval and Spacing
p.wordspacing{word-spacing:20px;}/*set the length of a space*/p.letterspacing{letter-spacing:20px;}/*Set Word spacing*/P.lineheight{Line-height:0.3;}/*Set Line spacing*/P.whitespace_normal{White-space:Normal;}/*by default, ignoring multiple spaces is 1, ignoring carriage return characters*/P.whitespace_pre{White-space:Pre;}/*Keep Multiple spaces*/P.whitespace_nowrap{White-space:nowrap;}/*Ignore carriage return, prohibit line wrapping until a BR is encountered*/P.whitespace_prewrap{White-space:Pre-wrap;}/*Keep all whitespace and carriage return characters*/P.whitespace_preline{White-space:Pre-line;}/*ignore multiple spaces for 1, keep carriage return*/
3. Text Decoration
/*text line is above*/. Overline{text-decoration:overline;}/*text line is below*/. Through{text-decoration:Line-through;}/*text line in the middle*/. Underline{text-decoration:Underline;}/*Oblique*/. Italic{Font-style:Italic;}/*Tilt*/. Oblique{Font-style:Oblique;}
4. The text exceeds the width of the parent element, then the ellipsis replaces
Div.elli{border:1px solid; Overflow:hidden/* beyond partially hidden */white-space:nowrap; /* force display on one line */ text-overflow:ellipsis; width:200px; height:20px;}
Not finished
Common CSS Code Snippets