sofish / proportion.js

meet the best proportion of the device.

Home Page:http://sofish.github.io/proportion.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

proportion.js

meet the best proportion of the device.

一、api

// ** Params
// @el: {Element} the element
// @isLanscape: [OPTIONAL] {Boolean} by default is `false`(portrait)
// @radio: [OPTIONAL] {Number}  the proportion of theShortSide/theLongSide,by default is `0.61`
// @maxWidth: [OPTIONAL] {Number} the max-width, by default is `640`
// @maxHeight: [OPTIONAL] {Number} the max-height, by default is `1008`

proportion(el, isLanscape, radio, maxWidth, maxHeight);

二、demo

http://sofish.github.io/proportion.js

About

meet the best proportion of the device.

http://sofish.github.io/proportion.js


Languages

Language:HTML 50.9%Language:JavaScript 49.1%