Top-Class Classic CSS Properties collection and collation _ Experience Exchange

Source: Internet
Author: User
Text justified on both sides:
Copy Code code as follows:

text-align:justify;
Text-justify:inter-ideograph;


Clear float:
Copy Code code as follows:

. clear{clear:both;line-height:0;height:0;font-size:0;}


To clear a floating pseudo class:
Copy Code code as follows:

. Clearfix:after{content: "."; Display:block;height:0;clear:both;visibility:hidden;}


Set no words to break
Copy Code code as follows:

Word-break:keep-all


Character Wrap
Copy Code code as follows:

Word-break:keep-all;word-break:break-all;word-wrap:break-word


Use Line-height to center vertically

Copy Code code as follows:

line-height:24px;/* use a fixed-width container and require a row to be centered vertically, use Line-height (which is the same height as the parent), and more vertically centered summaries can be seen here.
*/


Clear Container Float

Copy Code code as follows:

#main {Overflow:hidden;}


Do not allow links to be broken lines

Copy Code code as follows:

a {white-space:nowrap;}


Always have Firefox show scroll bars

Copy Code code as follows:

HTML {overflow:-moz-scrollbars-vertical;}

Center The Block element horizontally

Copy Code code as follows:

Body, HTML {min-height:101%;} or margin:0 auto;


Hide scroll bars for exploer textarea

Copy Code code as follows:

textarea {Overflow:auto;}


Set up print paging
Copy Code code as follows:

h2 {page-break-before:always;} /* Set pagination when printing Web pages * *


Delete a dashed box on a link
Copy Code code as follows:

A,area {blr:expression (This.onfocus=this.blur ())}
: Focus {-moz-outline-style:none;}

The simplest CSS reset
Copy Code code as follows:

* {margin:0; padding:0}/* This property is used with caution, although it eliminates the default properties, it has an effect on browser rendering and is poorly semantically expressed. */


Picture to enter after the text required properties

Copy Code code as follows:

Img{vertical-align:top;}

Transparent properties

Copy Code code as follows:

Filter:alpha (OPACITY=50); -moz-opacity:0.5; opacity:0.5;
Cursor:hand;


Replace the mouse with the shape of the hand
Copy Code code as follows:

Cursor:hand;
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.