auto-size-background

0.2.3 • Public • Published

Auto Size Background

Auto Size Background can set background image auto fit screen

Example

Click Me Open

Stretch the webpage to see the effect

Installation

npm i --save auto-size-background

Import the components you need, example:

import React from 'react'
import AutoSizeBackground from 'auto-size-background'
import img from 'img-link-here'

export default props => {
  return (
    <AutoSizeBackground src={img}>
      {props.children}
    </AutoSizeBackground>
  )
}

API

参数 说明 类型 默认值
src 图片地址 string -
dtl 图片伸缩方向,现在支持垂直、水平 vertical | horizontal horizontal

Run from local

$ npm install
$ npm start

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i auto-size-background

Weekly Downloads

0

Version

0.2.3

License

MIT

Unpacked Size

1.47 MB

Total Files

10

Last publish

Collaborators

  • changhsin