Align the two ends of the text:
CopyCode The Code is as follows: Text-align: justify;
Text-justify: Inter-ideograph;
Clear floating:Copy codeThe Code is as follows:. Clear {clear: Both; line-Height: 0; Height: 0; font-size: 0 ;}
Clear floating pseudo classes:Copy codeThe Code is as follows:. Clearfix: After {content: "."; display: block; Height: 0; clear: Both; visibility: hidden ;}
Set not to disconnect wordsCopy codeThe Code is as follows: Word-break: Keep-all
Automatic character line feedCopy codeThe Code is as follows: Word-break: Keep-all; Word-break: Break-all; Word-wrap: Break-word
Vertical center using line-height
Copy code The Code is as follows: Line-Height: 24px;/* use a fixed-width container and use line-height (the height is the same as that of the parent-layer container) when a row is in vertical residence ), for more vertical center summary, see here.
*/
Clear container float
Copy code The Code is as follows: # Main {overflow: hidden ;}
Do not fold links
Copy code The Code is as follows: A {white-space: nowrap ;}
Always display the scroll bar in Firefox
Copy code The Code is as follows: HTML {overflow:-moz-scrollbars-vertical ;}
Horizontally center block elements
Copy code The Code is as follows: body, HTML {Min-Height: 101%;} or margin: 0 auto;
Hide the scroll bar of exploer textarea
Copy code Code: textarea {overflow: auto ;}
Set print pagesCopy codeThe Code is as follows: H2 {page-break-before: Always;}/* sets the page when the web page is printed */
Delete the dotted box on the LinkCopy codeThe Code is as follows: A, area {BLR: expression (this. onfocus = This. Blur ())}
: Focus {-moz-Outline-style: none ;}
Simplest CSS ResetCopy codeThe Code is as follows: * {margin: 0; padding: 0}/* This attribute is used with caution. Although it can eliminate the default attribute, it has an impact on browser rendering and is not good at semantic expression. */
Attribute required for text after image press ENTER
Copy code The Code is as follows: IMG {vertical-align: Top ;}
Transparent attributes
Copy code The Code is as follows: filter: alpha (opacity = 50);-moz-opacity: 0.5; opacity: 0.5;
Cursor: hand;
Move the mouse to the hand shapeCopy codeThe Code is as follows: cursor: hand;