An open API service indexing awesome lists of open source software.

https://github.com/sofish/proportion.js

meet the best proportion of the device.
https://github.com/sofish/proportion.js

Last synced: 3 months ago
JSON representation

meet the best proportion of the device.

Awesome Lists containing this project

README

          

## proportion.js

> meet the best proportion of the device.

### 一、api

```js
// ** 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](http://sofish.github.io/proportion.js)