Jquery blog is fixed at the bottom, similar to everyone on campus

Source: Internet
Author: User

The fixed topic at the bottom is sometimes quite necessary, and some browsers are not very compatible.
And indicates that it can be implemented.
The bottom of the jquery blog is fixed like everyone on campus. It's just a blur.
You need to write it slowly.
1. <STYLE type = text/css>
2. * {margin: 0; padding: 0}
3. fixed {RIGHT: 15px; BACKGROUND: # ccc; LEFT: 15px; BOTTOM: 0; LINE-HEIGHT: 30px; POSITION: fixed; HEIGHT: 30px
4 .}
5. # iefixed {
6. MARGIN:-1px 15px 0px; OVERFLOW: hidden; ZOOM: 1; HEIGHT: 1px
7 .}
8. </STYLE>
9. <! -- [If lt IE 7]>
10. <script type = "text/javascript">
11. function _ fixBackground (){
12. var body = document. body;
13. var BLANK_GIF;
14. if (body. currentStyle. backgroundAttachment! = "Fixed "){
15. if (body. currentStyle. backgroundImage = "none "){
16. body. runtimeStyle. backgroundImage = "url (" + BLANK_GIF + ")"; // dummy
17. body. runtimeStyle. backgroundAttachment = "fixed ";
18 .}
19 .}
20 .}
21. window. onload = function (){
22. _ fixBackground ();
23 .}
24. </script>
25. <style type = "text/css">
26 .. fixed {
27. position: absolute;
28. bottom: auto;
29. clear: both;
30. width: expression (document. getElementById ('iefixed'). clientWidth );
31. left: expression (document. getElementById ('iefixed'). offsetLeft );
32. top: expression (eval (document. compatMode &&
33. document. compatMode = 'css1compat ')?
34. documentElement. scrollTop
35. + (documentElement. clientHeight-this.clientHeight)
36.: document. body. scrollTop
37. + (document. body. clientHeight-this.clientHeight ));
38 .}
39. </style>
40. <! [Endif] -->
 

 


From feixian

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.