Making resizable image backgrounds with HTML, CSS, and Javascript
I'm trying to create an image object or canvas object that will resize based on the window dimensions, but keep the aspect ratio. Is this possibl开发者_如何学编程e?
I know that with canvas, you can maintain bicubic scaling, but is it possible to have the image scale on the window resize while maintaining the aspect ratio?
You might want to give this a shot:
http://css-tricks.com/how-to-resizeable-background-image/
精彩评论