prisskreative
7/3/2014 - 8:45 PM

Background Properties

Background Properties

<!-- Background Properties -->

<div class="box">
</div>

<div class="scroll">
</div>

<div class="fixed">
</div>

<div class="local">
</div>

<style>
/* Default Value  */

.box {
	background-color: #fff;
	background-image: url ('texture.png') no-repeat;
	background-position: center bottom;( x axis horizontal - x axis vertical)
	background-position: 0 50%; 
}
.scroll {
	background-attachment: scroll;/* Default Value - The page scroll and the image too  */
}
.fixed {
	background-attachment: fixed;/* The image doesn't scroll with the page  */
}
.local{
	background-attachment: local;/* CSS3 The image is relative to the page and is fix to the element content and scroll */
}
.shorthand{
	background:#efefef url ('texture.png') no-repeat scroll center center;
}
</style>