Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the sticky Top effect of WEB Mobile end

Shulou Source: shulou.com Published: 2022-06-01 06:10:09 10月03日 Update

This article mainly introduces the relevant knowledge of "how to solve the sticky top effect of WEB mobile end". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "how to solve the sticky top effect of WEB mobile end" can help you solve the problem.

First of all, judge the current system. If it is Android, it routinely listens to scroll events and uses fixed to locate; iOS uses sticky to locate.

/ / Android

.tab-box-fixed {

Position: fixed

Z-index: 5

}

/ / iOS

.tab-box-sticky {

Position:-webkit-sticky

Position: sticky

Top: 0

Left: 0

Z-index: 5

}

This is the end of the content about "how to solve the sticky top effect of WEB mobile end". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Effects suction mobility knowledge industry positioning differences practicality events content practicality practice routines articles methods more cases knowledge points articles systems Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MySQL macOS Shulou Technology Redmi