Home > Web Front-end > CSS Tutorial > In one minute, I will show you how to write css compatible with ie

In one minute, I will show you how to write css compatible with ie

烟雨青岚
Release: 2020-07-14 11:53:33
forward
3036 people have browsed it

In one minute, I will show you how to write css compatible with ie

Many students are asking how CSS is compatible with IE browsers. Now I will introduce how to write CSS that is compatible with IE. Let’s take a look at it together. If there are any errors or deficiencies , welcome to point out.

width:auto; means automatic width.

\9 is a way of writing hack css. This way of adding "\9" after the normal css code can only be recognized by IE browser, other browsers will ignore it. statement.

In this way, browsers can be differentiated to achieve browser compatibility.

There are other ways to write hack css. For example:

color:red;// Generally recognized by browsers, the font color is red

color:blue \9;//IE8 , Recognized by IE9 and above, the font color is blue

*color:orange;//IE7 recognized, the font color is orange

_color:black ;//IE6 recognition, the color is black

The order cannot be reversed, because the later recognition will overwrite the previous recognition. For example: IE7 can recognize the writing with * and also recognize the normal writing

If the * css style is written in front and the normal one is written in the back, then it will recognize the later writing.

Thank you everyone for reading, I hope you will benefit a lot.

This article is reproduced from: https://blog.csdn.net/swiftlinlei/article/details/80583939

Recommended tutorial: "CSS Tutorial"

The above is the detailed content of In one minute, I will show you how to write css compatible with ie. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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