Top Classic common CSS Properties collection and collation _ Experience Exchange

Source: Internet
Author: User
Text Justification:
Copy CodeThe code is as follows:
text-align:justify;
Text-justify:inter-ideograph;


Clear float:
Copy CodeThe code is as follows:
. clear{clear:both;line-height:0;height:0;font-size:0;}


Clear floating pseudo-class:
Copy CodeThe code is as follows:
. Clearfix:after{content: "."; Display:block;height:0;clear:both;visibility:hidden;}


Set not to break a word
Copy CodeThe code is as follows:
Word-break:keep-all


Character Wrap Line
Copy CodeThe code is as follows:
Word-break:keep-all;word-break:break-all;word-wrap:break-word


Center vertically with Line-height

Copy CodeThe code is as follows:
line-height:24px;/* uses a fixed-width container and requires a vertical center line, use Line-height (the height is consistent with the parent container), and more vertical centers can be seen here.
*/


Clear Container Float

Copy CodeThe code is as follows:
#main {Overflow:hidden;}


Do not leave a link wrapped

Copy CodeThe code is as follows:
a {white-space:nowrap;}


Always let Firefox show scroll bars

Copy CodeThe code is as follows:
HTML {overflow:-moz-scrollbars-vertical;}

Center The Block element horizontally

Copy CodeThe code is as follows:
Body, HTML {min-height:101%;} or margin:0 auto;


Hide Exploer textarea scroll bar

Copy CodeThe code is as follows:
textarea {Overflow:auto;}


Set up print paging
Copy CodeThe code is as follows:
h2 {page-break-before:always;} /* Set page pagination when printing pages */


Delete a dashed box on a link
Copy CodeThe code is as follows:
A,area {blr:expression (This.onfocus=this.blur ())}
: Focus {-moz-outline-style:none;}

The simplest CSS reset
Copy CodeThe code is as follows:
* {margin:0; padding:0}/* This property is used with caution, although it can eliminate the default properties, but it has an impact on browser rendering, and it is also poorly represented in semantics. */


Picture enter after hit text need attribute

Copy CodeThe code is as follows:
Img{vertical-align:top;}

Transparency Properties

Copy CodeThe code is as follows:
Filter:alpha (OPACITY=50); -moz-opacity:0.5; opacity:0.5;
Cursor:hand;


Change the mouse to hand shape
Copy CodeThe code is 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.