0.1.0 • Published 5 years ago
easy-picture v0.1.0
What's that??
Create and style perfect images with javascript
Installation
npm i easy-picture --save
Then...
import { easyBackground } from 'easy-pictures'
easyBackground({
element: '#app',
backgroundUrl: 'http://example.com/image.png',
repeat: true,
position: 'center',
size: 'cover'
})
Configuration
easyBackground supports 2 necessary options:
element - HTML Element (class or id)
backgroundUrl - URL of the image you like to use as the background
and 5 more optional options:
repeat - boolean, 'repeat', 'repeat-y, 'repeat-x', 'no-repeat'
position - Default CSS
background-position
propertysize - Default CSS
background-size
propertywidth - Set the width of the element (Defaults to width of parent)
height - Set the height of the element (Defaults to height of parent)
0.1.0
5 years ago