Home > Web Front-end > CSS Tutorial > Detailed introduction to web front-end css style knowledge points

Detailed introduction to web front-end css style knowledge points

高洛峰
Release: 2017-03-27 17:58:34
Original
1979 people have browsed it

1. The priority of css style

There are many ways to use css style in html

External reference method

There is a way to write CSS that controls html directly from the <head>

tag The style statement

can be directly written into css in the tag you want to control to control the

priority:

Browser default style lowest

External reference style, secondly

head tag, secondly

the tag you want to control has the highest priority

2. You can combine selectors

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

You need to use a symbol in the middle to separate them so that they will have a unified style

The same element can also be specified for him Different attributes For example:

p.right{text-align:right}

p.center{text-align:center}

The above is the css style that controls the following html statement

The statement in html is:

this is right

this is center

In this way, specify different values ​​for the P elements. Class name, so that you can control different styles of the same element through the class name.

3. Browser support for css

Now css3.0 has many great effects, but some browsers do not support css styles very well, such as IE

Some styles of css3.0 are not supported by IE9. The systems we use now are generally IE7 8 9 browsers. It is simply too painful for development.

However, the Firefox browser is so powerful that it supports almost all styles. Google is also a great browser and should run the fastest, as well as our domestic 360 browser. He uses the IE kernel, which basically determines its fate. When doing development, the browsers we often use are Firefox, Google and IE. We can’t just use them because IE doesn’t support them, we have to use them to debug compatibility.

Firefox Browser’s firebug plug-in is good. It can be used to debug the CSS style code in the front desk. After changing the front desk, it will automatically modify it. There is no need to change the CSS style every time. Refresh the page. This improves the work efficiency of the front desk.

The above is the detailed content of Detailed introduction to web front-end css style knowledge points. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template