<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>类似QQ对话框上下部分可拖动代码-样例代码</title>

<style>

ul,li{margin:0;padding:0;}

body{font:14px/1.5 Arial;color:#666;}

#box{position:relative;width:600px;height:400px;border:2px solid #000;margin:10px auto;overflow:hidden;}

#box ul{list-style-position:inside;margin:10px;}

#box div{position:absolute;width:100%;}

#top,#bottom{color:#FFF;height:100%;overflow:hidden;}

#top{background:green;}

#bottom{background:skyblue;top:50%}

#line{top:50%;height:4px;overflow:hidden;margin-top:-2px;background:red;cursor:n-resize;}

</style>

<script>

function $(id) {

return document.getElementById(id)


}

window.onload = function() {

var oBox = $("box"), oBottom = $("bottom"), oLine = $("line");

oLine.onmousedown = function(e) {

var disY = (e || event).clientY;

oLine.top = oLine.offsetTop;

document.onmousemove = function(e) {

var iT = oLine.top + ((e || event).clientY - disY);

var maxT = oBox.clientHeight - oLine.offsetHeight;

oLine.style.margin = 0;

iT < 0 && (iT = 0);

iT > maxT && (iT = maxT);

oLine.style.top = oBottom.style.top = iT + "px";

return false

};

document.onmouseup = function() {

document.onmousemove = null;

document.onmouseup = null;


oLine.releaseCapture && oLine.releaseCapture()

};

oLine.setCapture && oLine.setCapture();

return false

};

};

</script>

</head>

<body>

<center>上下拖动红条改变显示区域高度</center>

<div id="box">

    <div id="top">

        <ul>

            <li><a href="/soft/3183.shtml" target="_blank">上面显示的内容</a></li><li><a href="/soft/3279.shtml" target="_blank">上面显示的内容</a></li><li><a 





href="/soft/2967.shtml" target="_blank">上面显示的内容</a></li><li><a href="/soft/5047.shtml" target="_blank">上面显示的内容</a></li><li><a href="/soft/1789.shtml" 





target="_blank">上面显示的内容</a></li><li><a href="/soft/1786.shtml" target="_blank">上面显示的内容</a></li><li><a href="/soft/3580.shtml" target="_blank">上面显示的内容





</a></li><li><a href="/soft/3450.shtml" target="_blank">上面显示的内容</a></li><li><a href="/soft/3454.shtml" target="_blank">上面显示的内容</a></li><li><a 





href="/soft/2434.shtml" target="_blank">上面显示的内容</a></li>

        </ul>

    </div>

    <div id="bottom">

        <ul>

            <li><a href="/soft/16003.shtml" target="_blank">以下显示的内容</a></li><li><a href="/soft/16002.shtml" target="_blank">以下显示的内容</a></li><li><a 





href="/soft/16001.shtml" target="_blank">以下显示的内容</a></li><li><a href="/soft/16000.shtml" target="_blank">以下显示的内容</a></li><li><a href="/soft/15999.shtml" 





target="_blank">以下显示的内容</a></li><li><a href="/soft/15921.shtml" target="_blank">以下显示的内容</a></li><li><a href="/soft/15867.shtml" target="_blank">以下显示的内





容</a></li><li><a href="/soft/15866.shtml" target="_blank">以下显示的内容</a></li><li><a href="/soft/15781.shtml" target="_blank">以下显示的内容</a></li><li><a 





href="/soft/15780.shtml" target="_blank">以下显示的内容</a></li>

        </ul>

    </div>

    <div id="line"></div>

</div>

<div><A href="http://www.999jiujiu.com/">http://www.999jiujiu.com/</A></div>

</body>

</html>

最新文章

  1. CSharpGL(11)用C#直接编写GLSL程序
  2. 小div在大div中垂直居中,以及div在页面垂直居中
  3. C#“同步调用”、“异步调用”、“异步回调”
  4. JS判断是否出现滚动条
  5. WCF - Hosting WCF Service
  6. WinDbg配置和使用基础
  7. android80 HttpClient框架提交数据 get方式
  8. javascript中的字符串编码、字符串方法详解
  9. C# 文件上传(可以多文件上传)
  10. jQuery选择器的分类
  11. 露脸!钉钉通过SOC2隐私性原则审计,安全和隐私保护达超一流国际标准
  12. Leetcode#442. Find All Duplicates in an nums(数组中重复的数据)
  13. Vue.js学习笔记(代码)
  14. C#如何实现DataGridView单元格拖拽
  15. xcfe桌面快捷键整理
  16. 第八周助教工作总结——NWNU李泓毅
  17. 34.QT-制作串口助手(并动态检测在线串口,附带源码)
  18. Velocity中判断是否为空
  19. pageHelper多个sql分页
  20. webpack.optimize.UglifyJsPlugin配置说明

热门文章

  1. .md即markdown文件的基本常用编写语法
  2. js数组元素的添加和删除
  3. jQuery实现checkbox即点即改,批量计数,以及中间遇到的坑
  4. Java多线程学习之ThreadLocal源码分析
  5. 72、django之简单验证码实现与form表单钩子函数补充
  6. Ambari概览
  7. mysql之ALTER COLUMN、CHANGE COLUMN、MODIFY COLUMN的区别
  8. 如何用while循环 输出一个九九乘法表
  9. 翻译连载 | 附录 A:Transducing(下)-《JavaScript轻量级函数式编程》 |《你不知道的JS》姊妹篇
  10. 《Linux命令行与shell脚本编程大全》第十六章 控制脚本