Fri Jun 17, 2011 5:09 pm
chèn vào cuối footer
chèn vào css
- Code:
<style type='text/css'>#top-bottom_middle {position:fixed;_position:absolute;bottom:2px;right:10px;clip:inherit;_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft+ document.documentElement.clientWidth - offsetWidth);}</style>
<script type='text/javascript'>var maxWidth = (document.body.clientWidth);var maxHeight = (document.body.clientHeight);</script>
<div id='top-bottom_middle'><a href='javascript:top.window.scrollTo(0,0)' title='Đầu trang'><img alt='Đầu trang' border='0' src='http://a.imageshack.us/img412/5197/topcv.png'/></a><br/><a href='javascript:window.scrollTo(maxWidth,maxHeight/2)' title='Giữa trang'><img alt='Giữa trang' border='0' src='http://a.imageshack.us/img340/733/middlef.png'/></a><br/><a href='javascript:window.scrollTo(maxWidth,maxHeight*10000)' title='Cuối trang'><img alt='Cuối trang' border='0' src='http://a.imageshack.us/img837/7515/bottomjf.png'/></a></div>
chèn vào css
- Code:
#backtotop {
width:100px;
background:#F4FFBF;
border:1px solid #ccc;
text-align:center;
padding:5px;
position:fixed;
bottom:10px;right:10px;
cursor:pointer;
color:#666;
text-decoration:none;
}