2008年10月5日 21:19 | 作者:admin
<!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> <style type="text/css"> html,body { margin:0; padding:0; overflow:hidden;height:100%; width:100%; text-align:left;} .body { position:relative; width:100%; height:100%; overflow-y:scroll; overflow-x:auto; cursor:default;} .tools { position:absolute; z-index:100; margin:0 auto; bottom:10px; left:40px; width:800px; height:30px; border:1px solid gray; background:#f7f7f7;} </style></head> <body> <div class="tools">>> 这里是工具条.</div> <div class="body"> <p style="margin:15px;">其实你拖动的是div,不是body</p> <div style="height:400px;background:red"></div> <div style="height:400px;background:yellow"></div> <div style="height:400px;background:green"></div> </div></body></html>
提示:你可以先修改部分代码再运行。
发表评论(没有评论) 分类:代码相关
姓名: *必填
邮件: *必填 (不会被公开)
网站: