JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q31386F
  • License MIT

移动端 rem 动态计算

Package Exports

  • blear.core.flexible

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (blear.core.flexible) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

blear.core.flexible

npm module build status coverage

用法

npm install -S blear.core.flexible
<head>
<script src="/node_modules/blear.core.flexible/src/index.js">
</head>

接口

全局注册 flexible

flexible.value

当前的 html fontSize 计算值。

flexible.px2rem(px)

像素大小计算为 rem 大小。

flexible.rem2px(rem)

rem 大小计算为像素大小。

flexible.onChange(fn)

监听 html fontSize 的变化。