js
var posX;
var posY;
fdiv = document
document
{
if(!e) e = window
posX = e
posY = e
document
}
document
{
document
}
function mousemove(ev)
{
if(ev==null) ev = window
fdiv
fdiv
}
html
<div class="divBody" id="divBody" style="left:
<div class="divHead" id="divHead" style="cursor: move;">
</div>
<div class="content">
</div>
<div class="tail">
</div>
</div>
css:
//margin
border: solid #CCC
width:
height:
position:relative;
z
margin
margin
}
width:
height:
background
}
{
width:
height:
}
background:#CCC;
height:
width:
display:table
vertical
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19969.html