O'Reilly logo

HTML5 Multimedia Development Cookbook by Lee Jordan, Dale Cruse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using background-size to control background appearance

Using CSS3, we now have a way to specify the size of our background images. We can specify this size in pixels, width and height, or in percentages. When you specify a size as a percentage, the size is relative to the width or height of the area that we have designated using background-origin.

Using background-size to control background appearance

Getting ready

Let's take a look at a real-world example at http://miessociety.org, a gorgeous website by Simple Honest Work, an agency created by designer Scott Thomas and dedicated to preserving the legacy of architect Ludwig Mies van der Rohe.

How to do it...

If we view the source of the stylesheet, we'll ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required