0.3.0 • Published 6 years ago
@axe/rem-resize v0.3.0
rem-resize
A flexible rem layout for h5.
Usage
It compiled with iife, so when you import and it will be work.
I recommend inject it at head so that it will be work before html rendered.
And load by cdn is a good idea.
<head>
...
<script src="https://easyread.nosdn.127.net/fle/a0df1d4009c7a2ec5fee/1522807676716/lib/index.js"></script>
<link rel="stylesheet" href="https://easyread.nosdn.127.net/fle/a0df1d4009c7a2ec5fee/1522807676716/lib/style.css">
...
</head>
API
By default, 1rem = 50px, you can also set it by yourself before loaded.
- window.MAX_WIDTH = 1024 fixed width if screen is very large
- window.DIV_PART = 15 It means 1rem = (750 / 15)px
- window.BODY_SIZE = 12 set body's font-size
export
- window.remUnit -> number
- window.px2rem (number|number+px) -> function
- window.rem2px (number|number+rem) -> function
Build Setup
# serve with hot reload at localhost:5000
fle dev
# build for production with minification
fle build
For detailed explanation, consult the docs for fle-cli.
0.3.0
6 years ago
0.2.8
6 years ago
0.2.7
7 years ago
0.2.6
7 years ago
0.2.5
7 years ago
0.2.4
7 years ago
0.2.3
7 years ago
0.2.2
7 years ago
0.2.0
7 years ago
0.1.9
7 years ago
0.1.8
7 years ago
0.1.7
7 years ago
0.1.6
7 years ago
0.1.5
7 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago