Skip to content

Responsive background images with fixed or fluid aspect ratios – Voormedia

June 20, 2013

Whats the easiest way to scale background images in responsive layouts? We use an old technique and enhance it to fluidly change the aspect ratio of background images.Responsive layouts make it possible to dynamically scale the width of a website to fit on small mobile devices as well as larger desktop computers. An element with a percentual width will have its height automatically adjusted. Its aspect ratio remains the same when it is resized.If we want to accomplish the same with background images we must figure out how to maintain the aspect ratio of any HTML element.

via Responsive background images with fixed or fluid aspect ratios – Voormedia.

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: