Backgrounds 7 12

broken image


  1. Backgrounds 7 12 10
  2. Backgrounds 7 123
  3. 7/12 Online Maharashtra
  4. Backgrounds 7 12 X

The CSS background properties are used to add background effects for elements.

112,215 free background images and pictures in HD. Related Images: nature water space sky abstract sea texture wallpaper zoom background. Find your next background that inspires and excites. Backgrounds available in HD and 4K quality. Install Bing Wallpaper in 6 easy steps. Download the Bing Wallpaper app. Run BingWallpaper.exe. Click Install now. If prompted from your browser, add the extension. Explore the Bing Wallpaper app in the system tray.

In these chapters, you will learn about the following CSS background properties:

  • background-color
  • background-image
  • background-repeat
  • background-attachment
  • background-position
  • background (shorthand property)

CSS background-color

The background-color property specifies the background color of an element.

Example

The background color of a page is set like this:

Try it Yourself »
Backgrounds 7 12

Backgrounds 7 12 10

With CSS, a color is most often specified by:

  • a valid color name - like 'red'
  • a HEX value - like '#ff0000'
  • an RGB value - like 'rgb(255,0,0)'
Backgrounds 7 12

Backgrounds 7 12 10

With CSS, a color is most often specified by:

  • a valid color name - like 'red'
  • a HEX value - like '#ff0000'
  • an RGB value - like 'rgb(255,0,0)'

Look at CSS Color Values for a complete list of possible color values.

Other Elements

You can set the background color for any HTML elements:

Example

Here, the

,

, and

elements will have different background colors:

h1 {
background-color: green;
}
div {
background-color: lightblue;
}
p {
background-color: yellow;
}
Try it Yourself »

Backgrounds 7 123

Opacity / Transparency

The opacity property specifies the opacity/transparency of an element. It can take a value from 0.0 - 1.0. The lower value, the more transparent:

Example

Try it Yourself »

Note: When using the opacity property to add transparency to the background of an element, all of its child elements inherit the same transparency. This can make the text inside a fully transparent element hard to read.

7/12 Online Maharashtra

Transparency using RGBA

If you do not want to apply opacity to child elements, like in our example above, use RGBA color values. The following example sets the opacity for the background color and not the text:

You learned from our CSS Colors Chapter, that you can use RGB as a color value. Wifi radar pro 2 4 qt. In addition to RGB, you can use an RGB color value with an alpha channel (RGBA) - which specifies the opacity for a color.

An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).

Tip: You will learn more about RGBA Colors in our CSS Colors Chapter.

Example

Backgrounds 7 12 X

div {
background: rgba(0, 128, 0, 0.3) /* Green background with 30% opacity */
}
Try it Yourself »





broken image