How position:fixed is compatible with lower browser versions

一个新手
Release: 2017-10-02 19:41:03
Original
2232 people have browsed it

I will write a blog to take notes about the pitfalls encountered in the project. Position: fixed is generally compatible with various browsers, but to be compatible with browsing lower versions, you have to use -webkit-transform: translateZ(0 ); this code.

When position: fixed;z-index: xxx; is used in the project, remember to add this css: -webkit-transform: translateZ(0); This is compatible with lower versions of position:fixed browsers, otherwise it will There is a browser flickering bug when scrolling. Of course, the transparency here: opacity: 0.9;
must also be compatible, so I won’t explain it in detail here.


.footer_main{
    position: fixed;
    height: 150px;
    background: url(/static/web-v2.0/images/ad/IT/IT_footer.png) no-repeat top center;
    width: 100%;
    left: 0;
    bottom: 0;
    z-index: 9;
    opacity: 0.9;
    -webkit-transform: translateZ(0);
}
Copy after login

The above is the detailed content of How position:fixed is compatible with lower browser versions. 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