Compatible with four-corner fixed background code in IE 6 Browser

Source: Internet
Author: User

Yesterday, a netizen asked "How to place images on the four corners of the HTML page". The answer is as follows for the Netizen's reference.

 1   <!  Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"  > 
2 < Html Xmlns = "Http://www.w3.org/1999/xhtml" >
3 < Head >
4 < Meta HTTP-equiv = "Content-Type" Content = "Text/html; charsets = UTF-8" />
5 < Title > Fixed background of Four Corners of browser window Code </ Title >
6 < Style Type = "Text/CSS" >
7 Html {
8 _ Overflow : Hidden ; /* For IE6 */
9 }
10 Body {
11 Margin : 0 ;
12 Padding : 0 ;
13 _ Height : 100% ; /* For IE6 */
14 _ Overflow : Auto ; /* For IE6 */
15 }
16 . Mainbox {
17 Position : Relative ;
18 _ Position : Inherit ; /* For IE6 */
19 Margin : 20px ;
20 Display : Block ;
21 Height : 2000px ;
22 Background : # E2e2e2 ;
23 }
24 . Topleft,. topright,. bottomleft,. bottomright {
25 Position : Fixed ;
26 Width : 100px ;
27 Height : 100px ;
28 Background-color : #990 ;
29 _ Position : Absolute ; /* For IE6 */
30 _ Z-Index : -1 ; /* For IE6 */
31 }
32 . Topleft {
33 Left : 0 ;
34 Top : 0 ;
35 }
36 . Topright {
37 Right : 0 ;
38 Top : 0 ;
39 }
40 . Bottomleft {
41 Left : 0 ;
42 Bottom : 0 ;
43 }
44 . Bottomright {
45 Right : 0 ;
46 Bottom : 0 ;
47 }
48 </ Style >
49 </ Head >
50 < Body >
51 < Div Class = "Topleft" > </ Div >
52 < Div Class = "Topright" > </ Div >
53 < Div Class = "Bottomleft" > </ Div >
54 < Div Class = "Bottomright" > </ Div >
55 < Div Class = "Mainbox" > Here is the text filled in the content area </ Div >
56 </ Body >
57 </ Html >

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.