css+javascript 弹出层代码

2016-03-02    编辑:kp12345     点击(
 代码如下 复制代码

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
 #requirePost { position:absolute; width:82px; border:1px solid #fc6; background:#F1F7FC; left:202px; top:45px; *left:202px; *top:115px; display:none; }
#requirePost ul li { margin:5px 0 5px 18px; }
#requirePost ul li a { color:#000; }
</style>
</head>

<body>
<li>
     <a class="color000" href="javascript:;" onmouseover="document.getElementById('requirePost').style.display='block'">求租求购</a></li>
<div id="requirePost" onmouseover="document.getElementById('requirePost').style.display='block'"  onmouseout="document.getElementById('requirePost').style.display='none'">
     
     
     <ul>
      <li><a class="color690" href="http://rent.111cn.net/requireForm.php">发布求租</a></li>
      <li><a class="color690" href="http://sale.111cn.net/requireForm.php">发布求购</a></li>
     </ul>
    </div>
</body>
</html>