Web foreground CSS style knowledge points detailed introduction

Source: Internet
Author: User
1. Precedence of CSS Styles

There are many ways to use CSS styles in HTML

<link href= "Ho.css" rel= "stylesheet" type= "text/css"/> External reference method

CSS style statements that control HTML directly from the

You can directly write CSS to control the tags you want to control.

Priority words:

Lowest browser Default Style

External reference Style second

The second in the head tag

Highest priority in the label you want to control

2. You can group selectors together

H1,h2,h3,h4,h5{color:green}

The middle needs to be separated by numbers, so they'll have a uniform pattern.

The same element can also give him different attributes such as:

P.right{text-align:right}

P.center{text-align:center}

Above this is the CSS style that controls the HTML statements below

The statements in HTML are:

<p class= "Right" > It is right</p>

<p class= "Center" > This is center </p>

This assigns a different class name to the P element, which allows you to control the different styles of the same element through the name of the class.

3. Browser support for CSS

Now css3.0 has a lot of great results, but some browsers do not support CSS style, such as IE

css3.0 style of some IE9 are not supported, we now use the system is generally IE7 8 9 browser. It's too painful for development.

However, the powerful Firefox, almost all the style of the browser support, as well as Google is a very good browser, running speed should be the fastest, as well as our domestic 360 browser, he used the IE kernel, basically decided its fate. To do development, we often use the browser is Firefox Google and IE can not be used because IE does not support the need to use it to debug compatibility.

Firefox Firebug plug-in is good, can be used to debug CSS style code at the front desk, changed the foreground automatically modified, do not need to change the CSS style every time you have to refresh the next page. This gives the front desk more work efficiency.

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.