0.0.6 • Published 3 years ago

@zhfejs/flexible v0.0.6

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

@zhfejs/flexible

大屏适配解决方案脚本

npm 安装

    npm i  @zhfejs/flexible -S

引入

在 main.js 中写入以下内容:

import { CssScale } from '@zhfejs/flexible';

new CssScale({scaleControlEl, designWidth, rootEl, limitClientWidth});

CDN

<script src="https://unpkg.com/@zhfejs/flexible@0.0.4/lib/flexible.umd.js"></script>
<script>
  var CssScale = window['@zhfejs/flexible'].CssScale;
  new CssScale({scaleControlEl, designWidth, rootEl, limitClientWidth});
</script>

CssScale类属性配置说明

名称类型默认值必选说明
scaleControlElstring/HTMLElementbody缩放控制dom节点
designWidthnumber1920设计稿宽度
rootElstring/HTMLElementbody>div视图dom根节点
limitClientWidthnumberundefined缩放最大限制宽度
0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago