1.0.0 • Published 1 year ago

@phaoerjs/auto-resize v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

auto-resize

web automatic adaptation

Installation

npm i @phaoerjs/auto-resize

Useage

autoResize({
	container: "#content",
	iframes: [".iframes"],
	standardWidth: 1920,
	minimumWidth: 1200, 
	zoomCallback: function (res) {
	    console.log(res);
	},
});

Option

  • container

    Body or any other element

  • iframes

    When an iframe is embedded, it can be configured to scale the iframe

  • standardWidth

    Web page standard width

  • minimumWidth

    When the width is less than or equal to minimaWidth, no scaling is performed

  • zoomCallback

    Every time you make a zoom, this function will be called and you can replace the background image