Detailed setting of background map

Source: Internet
Author: User
Tags define window
The original <body> label provides the following settings:
<body
Alink=colorvalue
Background=url
Bgcolro=colorvalue
Link=colorvalue
Text=colorvalue
bgproperties=fixed/* Background fixed
Leftmargin=pixels/* Distance from the left side of the browser display window
Topmargin=fixels/* Distance from the browser display window
>

The settings that HTML 3.2 can use are very limited, but in CSS 2.0 there is a more detailed setting for <body>.
There are roughly two types of CSS <body> settings:

Define a category of CSS between <style>
Body {background-image:url (n.jpg);
Background-repeat:not-repeat;
}
</style>
Or is
<body style= "Background-image:url (n.jpg); Background-repeat:no-repeat" >
Both are the same function.

CSS for the <body> label and more detailed definition, roughly as follows:
<body
Color:colorvalue
/* Foreground color

Background-color:colorvalue
/* Background color
There are five different ways to set color and Background-color:
1.color: #FFFFFF
2.color: #FFF
3.color:rgb (255,255,255)
4.color:purple
5.color:rgb (100%,50%,10%)

Background-image:url (n.jpg)
/* Background image file

Background-repeat:repeat|repeat-x|repeat-y|no-repeat
/* Repeat full Screen | Horizontal direction repeat | Repeat in vertical direction | No repeat Display

Background-attachment:scroll|fixed
/* Scroll or fix

Background-position:x%,y%|x,y|top|left|center|bottom|right
/* Background Map file location
>

You can also use HTML and CSS at the same time:
<body bgcolor= "Black" style= "Background-image:url (n.jpg); Background-repeat:no-repeat"
topmargin= "0" leftmargin= "0" link= "#ffffff" alink= "Aqua"
vlink= "Red" bgproperties=fixed text= "#FFFFFF" >

In this example, I define that the background will not be repeated and that the background is not scrolling with the screen ...
Such a setting can make the page layout will be a little more beautiful ....
The background picture can also be used more perfect ....

This is probably the case for backgrounds and <body> settings.
If the above content is wrong or if there is a problem.
welcome you mail to me ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.