Css ie6 position: invalid fixed solution

Source: Internet
Author: User

I used a position: fixed attribute in the css tutorial, but unfortunately, this attribute does not work in IE6, the tragic IE6, so I found a solution, we will share with you the best solution, and you may be able to use it in the near future.

1. The following figure shows the effect to be achieved:

The prompt is displayed in the visible area at the top right corner of the browser.
 

At this time, the browser rolled down, but the pop-up layer should be kept in the visible area at the top right corner of the browser.
 
2. The compatible solution code is as follows:

 

. Loading_tip {

Position: fixed;

_ Position: absolute;

Top: 10px;

Right: 5px;

_ Bottom: auto;

_ Top: expression(eval(document.doc umentElement. scrollTop + 10 ));

Background-color: # F0F0F0;

Padding: 5px;

Border: # 6FD65C solid 1px;

Z-index: 9999999;

}

 

/** Prevent jitter during dragging **/

* Html {

Background-image: url (about: blank );

Background-attachment: fixed;

}

 

. Content {

Height: 1500px;

}

 

The html code is as follows:
<Div class = "loading_tip"> This is the fixed area, and the rest disappears. </div>
<Div class = "content"> This is a lot of content areas. I want to drag them down. Do you want to join me in the fixed area above? </Div>
And finally implement the fixed effect on IE6.

Related Article

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.