CSS Box Model + selector (the object you selected to manipulate)

Source: Internet
Author: User

Box model

Turn http://www.cnblogs.com/cchyao/archive/2010/07/12/1775846.html

The main difference between the 1.W3C standard box model and the IE box model is whether the width and height of the content contains border padding

2. The standard content is not included in the border padding

3. How to make IE standard up, plus <!doctype html>

--------

Selector Selector

Turn http://www.cnblogs.com/yongzhi/articles/1267645.html

1. Highest priority border:1px solid #000!important <div style=> 3 High id= "content" #content {} level Fourth Pseudo class class= "content". Con tent{} 5th Level div{} 6th level *{}

In addition, you can use a very simple sentence to describe the CSS priority problem: When a CSS selector has more high-level properties, it will have a higher priority. such as #i100 *.c20 *.c10{} Priority will be higher than #i100 *.C10 div p span em{}, because the former has a third level and two fourth level selectors and the latter of the third and fourth levels of the selector is one, of course, the former priority is relatively high.

When you compare multiple CSS selector priorities of the same level, they define the location to determine everything. The following from the position of the CSS priority from high to low is divided into six levels:

    1. The CSS defined in <style/> in the
    2. The priority properties of the second level are defined by the @import introduced in the <style/> tag into the style sheet.
    3. The priority properties of the third level are defined by the style sheet introduced by the <link/> tag.
    4. The priority attribute of level fourth is imported into the style sheet definition by the @import in the style sheet introduced by the <link/> tag.
    5. The fifth level preferred style has user settings.
    6. The lowest priority is the default by the browser.

CSS Box Model + selector (the object you selected to manipulate)

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.