jquery 如何设置鼠标在div区域内时显示div,离开div隐藏div
1个回答
展开全部
<style type="text/css">
#div1{width:100px;height:100px;background-color:#000;}
</style>
<div id="div1" onmouseover="show(this,true)" onmouseout="show(this,false)"></div>
<script type="text/javascript">
function show(that, bFlag){
var iOpacity = bFlag ? 100 : 0;
that.style.opacity = iOpacity;
that.style.filter = "alpha(opacity="+iOpacity+")";
}
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询