|
||
|
||
HTML Background CodeHere you can get the HTML background code for setting the background of your web page. For example, you an set the background color or specify a background image. To set the HTML background, you actually use Cascading Style Sheets (CSS). You can set background properties on any HTML element, plus you can do things like, specify an image's position, whether it should repeat, how it should repeat etc. Background ColorThe This results in:
This box has had it's background set to the color blue.
Background ImageThis code sets a background image: This results in:
This box has a background image.
Fixed Background ImageYou can use the This results in:
This example shows how a background image can be set to a fixed position
- even though its containing block scrolls.
The contents of this box forces scroll bars to appear. When you scroll, you'll notice the image remains fixed.
Shorthand Background CodeThere's a quick way of setting all background properties of an HTML object. You can use the CSS This results in:
This box has had its all it's background properties set using the 'background' property. The background property is shorthand for setting many properties at once.
© Copyright 2006 - 2024 Code-Generator.net | Privacy Policy |