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

当鼠标移动到DIV上边时显示滚动条

我看到一个滚动条,是当鼠标移动到div上边时才显示,这个该怎么样实现呢?

能写下代码吗?


------解决方案--------------------
最好是有图示
------解决方案--------------------
试试如下:
<div onmouseover="scroll()" id="panel"></div>
<script>
function scroll(){
  document.getElementById("panel").style.overflowY="scroll";
}
</script>