Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that mobile browsers do not support position: fix

Shulou Source: shulou.com Published: 2022-06-03 08:15:36 11月15日 Update

This article introduces the knowledge of "how to solve the problem that mobile browsers do not support position: fix". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The specific methods are as follows:

Css code

The code is as follows:

.wap _ bottom {

Height: 60px

Width: 100%

Position: fixed

Z-index: 2

Bottom: 0

Left: 0

Opacity: 0.7

}

Html code

The code is as follows:

Matters needing attention

Generally speaking, we use position: fixed; in css to control the float, but this method is only applicable to the computer side, but not on the mobile side. The effect is to use the mobile browser to open the web page with the bottom, but when we scroll down, the floating one does not follow. At this time, we need to add the following code between head to solve the problem that mobile browsers do not support position: fixed bug.

The code is as follows:

This is the end of the content of "how to solve the problem that mobile browsers do not support position: fix". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Code mobile phone browser browsing support content method more knowledge floating no practical successful and then in general matters dilemmas actually that is the bottom. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Tech Info Redmi OPPO Reno Huawei