What the background does: transparent url (); do?

I saw css code where it looked like

   body { background: transparent url ('background.jpg') repeat scroll;} 

What makes a transparent meaning? I tried to figure it out but didn't help. Wouldn't background.jpg overestimate it?

Thank.

+5
source share
2 answers

transparent- Colour. An element can have both a background image and a background color.

The above is equivalent to:

body {
    background-color: transparent;
    background-image: url('background.jpg');
    background-repeat: repeat;
    background-attachment: scroll;
}

Color is important in general, if, for example, color. the background image does not load, or the image contains transparent areas, or the image does not repeat to fill the entire area (which admittedly does not apply to your example).

, transparent " ", background, .

, , transparent , :

  • , background-color;
  • , .

body.foo { background-color: blue; }
body.foo.bar { background-color: transparent; }
+7

, .

http://www.w3.org/TR/CSS21/colors.html#background
"background" , , .

background-color transparent, background:url(...);

,

background-color: transparent;
background-image: url(...);
background-repeat: repeat;
background-attachment: scroll;
background-position: 0% 0%;

.

( )

+3

All Articles