New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bee-flex

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-flex

flex

  • 1.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

bee-flex

弹性布局,通过设置html节点font-size并采用rem单位实现响应布局

可单独使用或配合vue等前后端分离框架使用,支持typescript

以REM布局优点是不用复杂计算字体大小和元素尺寸,设计尺寸以750为例,元素尺寸在设计稿的基础上除以100冠以rem尺寸即可,文本字号不建议自适应(具体原因可自行了解),字号工具设计稿dpr转换为css逻辑像素,使用方便

引入

  • install
npm install bee-flex
# or
cnpm install bee-flex
# or
yarn add bee-flex
import beeflex from 'bee-flex'
  • cdn
<script src="https://unpkg.com/bee-flex@1.1.2/build"></script>

使用

// beeflex(design,callback)

beeflex({
  design:750
},(options)=>{
  console.log(options)
})

参数

属性类型解释
configobject配置
callbackfunction回调函数,options为浏览器窗口信息
configs
属性类型解释
designnumber设计稿宽度
maxnumber最大宽度
options
属性类型解释
designnumber设计稿宽度
widthnumber浏览器当前视口宽度
heightnumber浏览器当前视口高度
remnumber当前rem值

更多

需要添加功能或者存在 bug 请提交 issues,在空余时间会尽快处理。

Keywords

FAQs

Package last updated on 01 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc