有用的导航栏下拉代码和调用时间日期函数

<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Plain Shane Design > CSS Drop Down Demo</title>
<style type="text/css">
*{margin:0; padding: 0;}
#nav ul { list-style-type:none; }
#nav ul li { float:left; position: relative;}
#nav ul li a { border-right:1px solid #e9e9e9; padding:20px; display:block; text-decoration:none; text-
align:center; color:#999;}
#nav ul li ul {display: none;}
#nav ul li:hover ul {display: block; position: absolute; top:56px; min-width:190px; left:0;}
#nav ul li:hover ul li a {display:block; background:green; color:#ffffff; width: 110px; text-align:
center; border-bottom: 1px solid #f2f2f2; border-right: none;}
.top { border-top: 1px solid #f2f2f2;}
</style>
</head>
<body>

<div id="nav">
<ul>
<li><a target="_blank">Contact</a>
<ul>
<li class="top"><a href="http://www.jb51.net" target="_blank">Web</a></li>
<li><a href="http://www.jb51.net" target="_blank">Print</a></li>
<li><a href="http://www.jb51.net" target="_blank">The Rest</a></li>
</ul>
</li>
</ul>
</div>
</div>

</body>
</html>

 

 

 

<script language=Javascript>
var now=new Date()
document.write(1900+now.getYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+"日 星期"+(now.getDay()))
</script>

posted @ 2015-12-02 16:37  zhenximeiyitian  阅读(139)  评论(0编辑  收藏  举报