日期:2014-05-16  浏览次数:20490 次

可以拉伸的div
我想做一个可以拉伸的div 就是鼠标移动到div边框时鼠标的形状变成左右或者上下箭头 并且按下鼠标时可以拉伸div的大小 小弟搞了几天 头昏脑胀 可否给一段代码
------解决方案--------------------
代码
http://www.twinhelix.com/javascript/dragresize/demo/
------解决方案--------------------
up!!
------解决方案--------------------
没搞过,帮你顶下,像这种代码在网上应该是挺多的,你应该去查一下,熟悉里面的思想,然后再来实现你的需求
------解决方案--------------------
up之
------解决方案--------------------
打个标记,明天来看
------解决方案--------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>MS_resizeDiv.html</title>

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script>   
     document.execCommand("2D-position", false, true);   
</script>   
  </head>
  
  <body>
    <DIV contentEditable=true>   
<DIV style="WIDTH: 300px; POSITION: absolute; HEIGHT: 100px; BACKGROUND-COLOR: red">移动层</DIV>   
</DIV>
  </body>
</html>

jquery的插件jqmodel可以拖动大小,也很不错哦