Stretch and Scale a CSS image Background - With CSS only
- by Fábio Antunes
Good day.
I always wanted to do this.
I want that my background image stretch and scale depending the Browser view port size.
I've seen some questions on SO that do the job, this
One for example. Works well, but i want place the img in the background way, not with a image tag.
In that one is placed a img tag, then with CSS we tribute to the img tag.
width:100%; height:100%;
It works, but that question is a bit old, and states that in CSS3 resizing a background image will work pretty well. I've tried this example the first one but i didn't workout for me.
Does somebody know a good method to do it with the background image statement?
If its sounds confusing just ask.
Thanks