1.2.2 • Published 6 years ago
screen-flexible v1.2.2
screen-flexible
Adaptive solution for screen page.
Language
Installation
npm install screen-flexible
Usage
The screen resolution is: 1920*1080
import 'screen-flexible/dist/auto'
The screen resolution is custom, eg: 1600*1000
import { bodyResize } from 'screen-flexible'
let timer
window.addEventListener('resize', () => {
clearTimeout(timer)
timer = setTimeout(() => { bodyResize(1600, 1000) }, 300)
})
bodyResize(1600, 1000)
Type option
import { bodyResize } from 'screen-flexible'
/**
* Types of resize method
* 'padding': default, use the minimum axis scale and maximum axis will be padding with blank
* 'width': use the x-axis scale
* 'height': use the y-axis scale
* 'full': use both x-axis and y-axios scale to fullfill the screen
*/
let timer
window.addEventListener('resize', () => {
clearTimeout(timer)
timer = setTimeout(() => { bodyResize(1920, 1080, 'full') }, 300)
})
bodyResize(1920, 1080, 'full')
1.2.2
6 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.9
6 years ago
1.1.8
6 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago