html如何设置鼠标悬停div块显示,已经把默认改为不显示,如何设置悬停的时候显示?
1个回答
展开全部
看看下面的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<style type="text/css" >
.str{
height:23px;
width:100px;
border-bottom:#303030 solid 1px
}
.sdelete{
position:absolute;
font-size:12px;
color:#999;
width:10px;
font-weight:900;
padding:0px;
border:none;
left:2px;
cursor:pointer;
}
.surl{
display:block;
height:22px;
line-height:22px;
padding-left:13px;
overflow:hidden;
border-bottom:#333333 solid 1px
}
</style>
<script type="text/javascript" >
function omover() {
var divlist = document.getElementById("lishistory");
divlist.style.display = "block";
}
function omout() {
var divlist = document.getElementById("lishistory");
divlist.style.display = "none";
}
</script>
</head>
<body>
<div >
<div class="mod_user" onmouseover ="omover();" onmouseout ="omout();">
<p > <a class="list_hist" id="listLink" ><strong >您的播放记录</strong></a></p>
<div id="lishistory" class="user_operate_list" style="display: none">
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">妖精的尾巴/魔导少年</a></div>
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">嘿店</a></div>
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">唐宫美人天下国语</a></div>
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">法证先锋3/法证先锋Ⅲ</a></div>
</div>
</div>
</div>
</body>
</html>
链接地址:http://yksyuan.blog.163.com/blog/static/172305616201111233412465/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<style type="text/css" >
.str{
height:23px;
width:100px;
border-bottom:#303030 solid 1px
}
.sdelete{
position:absolute;
font-size:12px;
color:#999;
width:10px;
font-weight:900;
padding:0px;
border:none;
left:2px;
cursor:pointer;
}
.surl{
display:block;
height:22px;
line-height:22px;
padding-left:13px;
overflow:hidden;
border-bottom:#333333 solid 1px
}
</style>
<script type="text/javascript" >
function omover() {
var divlist = document.getElementById("lishistory");
divlist.style.display = "block";
}
function omout() {
var divlist = document.getElementById("lishistory");
divlist.style.display = "none";
}
</script>
</head>
<body>
<div >
<div class="mod_user" onmouseover ="omover();" onmouseout ="omout();">
<p > <a class="list_hist" id="listLink" ><strong >您的播放记录</strong></a></p>
<div id="lishistory" class="user_operate_list" style="display: none">
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">妖精的尾巴/魔导少年</a></div>
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">嘿店</a></div>
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">唐宫美人天下国语</a></div>
<div class="str"><a href="javascript:void(0)" class="sdelete">×</a>
<a href="#" class="surl">法证先锋3/法证先锋Ⅲ</a></div>
</div>
</div>
</div>
</body>
</html>
链接地址:http://yksyuan.blog.163.com/blog/static/172305616201111233412465/
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询