Home  >  Article  >  Web Front-end  >  Solution to the problem that opacity is not compatible with ie8

Solution to the problem that opacity is not compatible with ie8

高洛峰
高洛峰Original
2017-03-28 17:24:202056browse

When I was testing the project today, I found that the opacity attribute was not compatible with ie8. Finally, I checked online and found that it can be solved by using the following attributes. I am very happy!

css: filter:Alpha(Opacity=50)/*This is a private property of IE, only applicable to IE*/

If you want to be compatible with major browsers, just use the following properties.

opacity: 0.5; /* Browsers that support CSS3 (mainstream)*/

-moz-opacity:0.5; /* Firefox private properties*/

filter: alpha(opacity=50); /* IE private property, only applicable to IE*/

The above is the detailed content of Solution to the problem that opacity is not compatible with ie8. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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