Home > Web Front-end > HTML Tutorial > Strange thing, please help an HTML expert. I hope that the scroll bar will be at the bottom when I open the browser, but IE6 and IE9 cannot be valid at the same time? _html/css_WEB-ITnose

Strange thing, please help an HTML expert. I hope that the scroll bar will be at the bottom when I open the browser, but IE6 and IE9 cannot be valid at the same time? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:22:30
Original
1178 people have browsed it

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><style type="text/css"><!--body {background-image: url();background-color: #FFFFFF;margin:0; padding:0 10px 0 10px;height:100%;overflow:auto;}.STYLE1 {color: #FFFFFF}body,td,th {font-size: 13px;line-height:150%}a{text-decoration:none;}a:hover{ text-decoration:underline; }#wrap {display:block;bottom:0px;right:1px!important;right:18px;width:955px;line-height:30px;position:fixed;border:1px solid #fff;}*html{overflow-x:auto;overflow-y:auto;} * html #wrap {position:absolute;}--></style></head><body onload='document.body.scrollTop = document.body.scrollHeight;'><br>正文,希望一打开浏览器滚动条就在最下面<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文,希望一打开浏览器滚动条就在最下面<br><br>正文<br><div id="wrap"><table style="width:100%;" cellspacing="0" border="0"><tr><form name="Form" method="post" action="ztcad.php"><td>查询:<input type="text" name="keyword" size="25" onfocus="this.select();"> <input type="submit" name="Submit" value=" 查… " onclick="Javascripts:ockForm();return false;"></td></form><td align="right">固定内容 <td></tr></table></div></body></html>  
Copy after login


If then it can be displayed normally under IE6, and the scroll bar will disappear as soon as the browser is opened. It can automatically go to the bottom, but it does not work under IE9.

If changed to it can be displayed normally under IE9, but under IE6 the browser scroll bar cannot be directly opened at the bottom.

Since the content of the fixed search box cannot be removed (if the div layer of the fixed content is removed, the two codes are valid under each IE version, but this fixed layer must be retained. Of course, the code of the layer can also be modified, As long as it has this effect), I would like to ask experts how to display the scroll bar at the bottom of the web page while retaining the content of the fixed search box, and how to have this effect in all versions of browsers?


Reply to discussion (solution)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><style type="text/css"><!--body {background-image: url();background-color: #FFFFFF;margin:0; padding:0 10px 0 10px;height:100%;overflow:auto;}.STYLE1 {color: #FFFFFF}body,td,th {font-size: 13px;line-height:150%}a{text-decoration:none;}a:hover{ text-decoration:underline; }#wrap {display:block;bottom:0px;right:1px!important;right:18px;width:955px;line-height:30px;position:fixed;border:1px solid #fff;}*html{overflow-x:auto;overflow-y:auto;} * html #wrap {position:absolute;}--></style></head> <body onload='if (window.location.href.indexOf("#")<0) {window.location.href = window.location.href+"#footer";}'><br>正文,希望一打开浏览器滚动条就在最下面<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文<br><br>正文,希望一打开浏览器滚动条就在最下面<br><br>正文<br><div id="wrap"><table style="width:100%;" cellspacing="0" border="0"><tr><form name="Form" method="post" action="ztcad.php"><td>查询:<input type="text" name="keyword" size="25" onfocus="this.select();"> <input type="submit" name="Submit" value=" 查… " onclick="Javascripts:ockForm();return false;"></td></form><td align="right">固定内容 <td></tr></table></div><div id='footer'></div></body></html> 
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template