HTML and CSS Reference
In-Depth Information
div.three {
background: url(images/background_sizing_tile.png)
no-repeat top left;
/* for Firefox */
-moz-background-size: contain;
/* for Safari and Chrome */
-webkit-background-size: contain;
/* for Opera */
-o-background-size: contain;
/* W3C specs */
background-size: contain;
}
[...]
<div class="one">
Background with no background sizing
</div>
<div class="two">
Background with background-size set to cover
</div>
<div class="three">
Background with background-size set to contain
</div>
Figure 14.4 Examples of background-size keywords.
Search WWH ::




Custom Search