An open API service indexing awesome lists of open source software.

https://github.com/ddvjs/vue-imagefill

The Vue directive for making images fill their containers
https://github.com/ddvjs/vue-imagefill

image-fill imagefill vue vue-imagefill

Last synced: 4 months ago
JSON representation

The Vue directive for making images fill their containers

Awesome Lists containing this project

README

          

# vue-imagefill
>A Vue.js 2.0 images fill directives

## Install

```shell
$ npm install vue-imagefill
```

## Usage
```html





```

```javascript
import Vue from 'vue'
import vueImagefill from 'vue-imagefill'
import 'vue-imagefill/src/style/vue-imagefill.css'
Vue.use(vueImagefill)

export default {
data () {
return {
img: require('~/assets/images/text.jpg')
}
}
}
```

```style
.image-wrap {
width: 200px;
overflow: hidden;
margin: 150px auto;
}
img {
width: 100%;
}
```

![demo](http://2.img.sic.wiki//upload/other/62d9c1575F0b92744242E9D582.jpg)

## Options
|directives|description|default|options|
|:---|---|---|---|
| `v-flex`|image scaling. width/height, example: `v-flex="150/200"`|`1`|`Number`|
| `v-center`|image src or none|