html如何设置鼠标悬停div块显示,已经把默认改为不显示,如何设置悬停...

发布网友 发布时间:2022-04-24 02:28

我来回答

1个回答

热心网友 时间:2022-05-14 02:00

看看下面的代码
<!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/追问http://zhidao.baidu.com/question/583131690405197525.html?quesup2&oldq=1

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com