I use the img tag for my slider images, I need the image to be full and vertical, and centered inside its container.
My problem is that when I resize the window, my image becomes small and the height does not depend on the height of the window. I need the same behavior as background-size: cover , but with an image tag .
background: url(../images/slider/002.jpg) center center; background-size: cover;
If I make the image as a background, everything will be fine, but the slider will not. I need to use the <img> . Here is my example .
source share