1.1.0 • Published 9 years ago
ambiguis v1.1.0
AmbiguisJS
Simply configure the mobile terminal responsive page
Thanks @amfe: lib-flexible
Build
Install modules
$ npm installTransform ES6 to ES5
$ gulp defaultMinify and Uglify
$ gulp compressUsage
Use <scipt></script>
<script src="./dist/ambiguis.js"></script>
<script type="text/javascript">
ambiguis({
initialDpr: 1,
maximumDpr: 3,
fontSize: 16,
maxWidth: 517
})
</script>Use webpack
$ npm install ambiguis --saverequire('ambiguis')({
initialDpr: 1,
maximumDpr: 3,
fontSize: 16,
maxWidth: 517
});Properties
ambiguis({ initialDpr, maximumDpr, fontSize, maxWidth })
- initialDpr——The dpr will be set to the number you want.
- maximumDpr——The dpr will never largest than the number you want.
- fontSize——The body's default
font-sizewill be set to the number you want.(Default: 12) - maxWidth——When the
window.innerWidthlarger than this number, we usemaxWidthinstead ofwindow.innerWidth.So the root font size will be limited.
There is a global variable ele provides the basic information of the current page
License
This content is released under the MIT(This content is released under the MIT License.) License.