1. Technology
Send to a Friend via Email

The CSS 3 background-size Property Examples

Stretch Your Background Images

If your browser supports the background-size property of CSS 3, then the div below the advertisement will have a picture of my two cats stretched across the whole div. However, if your browser doesn't support the property, then you'll only see the image in the upper left corner of the div.

The CSS 3 background-size Property

Stretch the Background on a DIV

The CSS 3 background-size Property

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam nec neque quis quam dictum ornare. Aliquam sollicitudin rutrum pede. In dolor nibh, iaculis ac, laoreet eu, fermentum et, erat. Maecenas pharetra pede sed dolor. Etiam nec ante at massa viverra sagittis. Morbi tempor lacinia sapien. Vestibulum nibh. Sed mi nisi, condimentum placerat, rhoncus a, ultricies sit amet, ipsum.

Vivamus varius massa a tellus. Aliquam a sapien ut augue commodo ullamcorper. Aliquam tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc pharetra. In est metus, suscipit et, fringilla at, rutrum sit amet, nisl. Nunc cursus justo quis elit semper aliquet. Praesent eget sapien at orci tempor viverra. Praesent porta, mi at sollicitudin auctor, tortor pede eleifend velit, sed mattis odio lacus et tortor. Proin massa.

The CSS 3 background-size Property

Jennifer Kyrnin

©2014 About.com. All rights reserved.