ragnarlotus / vue-flux

Image slider which comes with 20 cool transitions
https://ragnarlotus.github.io/vue-flux-docs/demos/demos
MIT License
542 stars 49 forks source link

How can I make image with background-size: contain #42

Closed StphamZ closed 5 years ago

StphamZ commented 5 years ago

I have some image have height is greater than width but I need show full image in slide then can do it with css property background-size: contain, but I don't see any option in vue-flux for that.

Is possible to show full image height is greater than width and custom color of background behind the image?

Example:

screenshot_4

Or something like this is cool:

screenshot_1

ragnarlotus commented 5 years ago

It is not possible. The reason is because doing so, would make transitions look wrong.

At the very first versions I had it like this and had to remove because screwed the effect.

The only thing you can do is to set all images with same height and width, set that size to the slider in the middle and control the parent node background the way you want.

Regards

StphamZ commented 5 years ago

Thank @deulos!