How to solve the sticky Top effect of WEB Mobile end
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.