-webkit-margin-before and extended browser prefix, kernel

Source: Internet
Author: User

-webkit-margin-before is a method statement that defines CSS3.0 for the article segment P container.

Display:block only defines the P container as a block,

And:-webkit-margin-brfore/after:1em----respectively define the top margin and the bottom margin of the value is 1 time times the font height , if the word 10px, then the margin is 10px;

-webkit-margin-start/end:0px----Definition P container is 0px for both leftand right margins.

In other words CSS3:

p {

Display:block;

-webkit-margin-before:1em;

-webkit-margin-end:1em;

-webkit-margin-after:1em;

-webkit-margin-start:1em;

}

Equivalent in CSS2:

p {

Display:block;

Margin-top:1em;

Margin-right:1em;

Margin-bottom:1em;

Margin-left:1em;

}

But because CSS3 requires a higher browser version, so there is no popular CSS3 style, still CSS2 as the mainstream, but the future should be CSS3 the world, because it represents the advanced.

Browser kernel:

WebKit was originally an open source project for Apple, their own safari was useful, and Google built an open-source browser project chromium with the typesetting engine and its own V8 JavaScript engine, and use this project only to do their own chrome. At the same time, both of the browser cores on the mobile platform are WebKit. Thanks to the chromium engine, there are also many WebKit browsers on the PC platform: 360, windows of the world, Maple browser, Sunflower browser, Sogou browser, roaming 3, Cheetah Browser. Basically said that they are dual-core, what is the speed mode, are used chromium, the corresponding, Microsoft (Microsoft) ie with the Trident typesetting engine, which is often said IE kernel, Firefox also has its own gecko typesetting engine. Apple's ibooks also uses WebKit as the typesetting engine, while sigil this editing software is chromium, because it is also the WebKit kernel.

Browser prefix:

Common:-webkit-(Chrome),

-moz-(Firefox),

-0-(Opera),

-ms-(IE)

Why do you have to have a private prefix:

The organization of HTML and CSS standards is very slow, usually, there are members of the Organization to propose a new attribute, such as fillet border-radius, we all feel good, but it will not set standards for this attribute, but to go through the complex procedures, after a lot of review, Browser vendors do not want to wait so long, they think a property is mature enough, will be added to the browser support, but to avoid the future published standards, Border-radius Standard writing, then let the new version of the browser support Border-radius properties.

For example: Chrome10 is not recognized Border-radius this way of writing, can only use-webkit-border-radius, and Chrome12 can recognize, so in the time to write CSS, this will ensure that Chrome10 and 12 of the Web page can be displayed normally.

-webkit-margin-before and extended browser prefix, kernel

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.