CSS3 > Background

Background Property in CSS3

How to set the different background properties in one declaration in CSS3?


By using background property we can set the different background properties in one declaration.

<style>
        body {
            background: lightgreen url("snitfunda.jpg") repeat-y fixed center;
        }
</style>

<body>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
    <p>TechFunda.com</p>
</body>

In the above code snippet we have given 4 background styles (background-color, background-image, background-repeat, background-position) in one declaration by using background property.

OUTPUT

 Views: 3567 | Post Order: 44



Write for us






Hosting Recommendations