There are generally 2 ways to design a sliding screen frame
- Control Parent Container Method
- Control sub-container method
This is the control of the parent container method
Swipe the page up or down by controlling the value of the parent container's transform: Translatey or Margin-top or top, each time the offset is the current page height ~
With the slip frame, the library size is 5.75K, very lightweight and can be used with confidence in your project ~
The page style of the slip frame needs to be customized, but here I'm simply writing it out ~
(If you do not use frames, it is recommended to use the Transform:translate (x, y) notation, first transform:translate can design high-performance animation, followed by android2.3+-compatible system, transform: Translatey incompatible with android2.3 system)
Compatible with ios5+, android2.3+ system, its sliding screen function, responsive ~ If you only need to design a simple sliding screen effect, you can consider it ~
Slip frame more detailed features bash here https://github.com/binnng/slip.js
<! DOCTYPE html>DEMO
Mobile frame-control of the parent container's sliding-screen frame-slip.js