Css control layer at the bottom

Source: Internet
Author: User
The code is as follows: Copy code

<! DOCTYPE html PUBLIC "-// w3c // dtd xhtml 1.0 strict // en" "http://www.w3.org/tr/xhtml1/dtd/strict.dtd">
<Html id = "oHTML" xmlns = "http://www.w3c.org/1999/xhtml">
<Head> <title> The css control layer is at the bottom </title>
<Style type = "text/css">
Html {overflow: hidden}
Body {overflow: auto ;}
* {Margin: 0 auto; padding: 0 auto}
# Aa {height: 30px; border: 1px solid red; position: absolute; bottom: 0px; left: 0px; width: 100%}
</Style>
</Head>
<Body id = "ll">
<Div id = "aa"> at the bottom </div>
<Span id = "ss"> </span>
<Script language = "javascript">
Window. onload = function ()
{
Var bodyH, htmlH;
HtmlH = document. getElementById ("oHTML"). offsetHeight;
BodyH = (htmlH-4) + "px ";
Document. getElementById ("ll"). style. height = bodyH;
}
Function showT (iData)
{
Var s, I;
Var a = [];
A. push ("<table width = \" 200 \ "> ");
For (I = 1; I <= iData; I ++)
 {
S = "<tr> <td align = \" center \ ">" + I + "</td> </tr> ";
A. push (s );
 }
A. push ("</table> ");
S = a. join ("");
Document. getElementById ("ss"). innerHTML = s;
}
ShowT (100)
</Script>
</Body>

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.