Organize the recommended CSS property writing order

Source: Internet
Author: User


One. Mozilla recommends CSS rules

<span style= "Font-family:microsoft Yahei;" >/* Suggested Order: * Display * list-style * position * float * clear * width * Height * margin * pa   dding * Border * background * color * font * text-decoration * text-align * vertical-align * white-space * Other text * content * */</span>


For details, see http://www.mozilla.org/css/base/content.css


Two. Yiwen ' s Blog is subdivided into:

<span style= "Font-family:microsoft Yahei;"    >/* Display Properties */displays List-style position float clear/* Self properties */width height margin padding border background /* Text property */color font text-decoration vertical-align white-space ohter text content</span>

in Yiwen Fly ' s There is a blog called Ing added that this is also related to the browser parsing process: The browser first position the DOM, and then parse its own properties, and then resolve the internal objects. (no relevant English materials have been found, people who have the knowledge also hope to inform).


Three.  andy Ford subdivision

1.Display & Flow

2.Positioning

3. Dimensions

4. Margins, Padding, Borders, Outline

5. Typographic Styles

6. Backgrounds

7. Opacity, Cursors, Generated Content

Rule example:

<span style= "font-family:microsoft yahei;" >.cl {      display: ;       Visibility: ;      float: ;      clear:  ;            position: ;       top: ;      right: ;       bottom: ;      left: ;       z-index: ;           width: ;       min-width: ;      max-width: ;       height: ;      min-height: ;       max-height: ;      overflow: ;        margin: ;      margin-top:  ;      margin-right: ;       margin-bottom: ;      margin-left: ;         padding: ;      padding-top: ;       padding-right: ;      padding-bottom: ;       padding-left: ;        border-width:  ;      border-top-width: ;       border-right-width: ;      border-bottom-width: ;       border-left-width: ;        border-style:  ;       border-top-style: ;      border-right-style: ;       border-bottom-style: ;      border-left-style: ;         border-color: ;      border-top-color:  ;      border-right-color: ;       border-bottom-color: ;      border-left-color: ;         outline: ;        list-style:  ;        table-layout: ;       caption-side: ;      border-collapse: ;       border-spacing: ;      empty-cells: ;         font: ;      font-family: ;      font-size: ;       line-height: ;      font-weight: ;       text-align: ;      text-indent: ;       text-transform: ;      text-decoration:  ;      letter-spacing: ;       word-spacing: ;      white-space: ;       vertical-align: ;      color: ;         background: ;      background-color: ;       background-image: ;      background-repeat: ;       background-position: ;        opacity: ;         cursor: ;        content:  ;      quotes: ;  }</span>

Details Visible http://fordinteractive.com/2009/02/order-of-the-day-css-properties/

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.