Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use slip js

Shulou Source: shulou.com Published: 2022-06-02 15:43:56 10月03日 Update

This article mainly explains "how to use slip js". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use slip js.

Slip is a mobile sliding screen web framework, changing the library size to 5.75K, very lightweight, compatible with ios5+, android2.3+ systems, its sliding screen function, sensitive response.

Slip.js call

Varcontainer=document.getElementById ('container')

Varpages=document.querySelectorAll ('.page')

Varslip=Slip (container,'y') .webapp (pages)

Slip: expose the global method, as long as you introduce slip.js, you can get this practical and powerful method.

Container: the container that is slipped, inside which is each sliding page.

'yslide: the direction in which the page is scanned. You can also pass in'x'.

Webapp: sets the way the page appears as a full-screen sliding page.

Pages: a list of page elements.

Page style of slip frame

The page style of the slip frame needs to be customized, but I have simply written it here.

(if you do not use the framework, it is recommended to use transform:translate (XQuery Y). First, transform:translate can design high-performance animation. Secondly, transform:translateY is compatible with android2.3+ systems. Transform:translateY is not compatible with android2.3 systems.)

Compatible with ios5+ and android2.3+ systems, its sliding screen function, sensitive response ~ if you only need to design a simple sliding screen effect, you can consider it ~

Slip

At this point, I believe you have a deeper understanding of "how to use slip js". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Page method framework system practical sensitive content function style learning deeper element global interest writing animation size practicality reality container Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Tech Info Apple vpn Shulou Information