您的位置:下载首页 » 技术文章
可关闭的主题背景
2010/9/7 15:56:35 | 来源:众智源码网 | 浏览:次阅读

<!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>
<script language="javascript">function g(id){return document.getElementById?document.getElementById(id):null;}</script>
<style>
body { margin:0;}
#layout { width:950px; margin:0 auto; line-height:100px; background:#ddd; height:800px; text-align:center;}

/* aoyun start */
#clStyle{position:absolute;top:6px;right:6px;display:block;height:43px;width:18px;overflow:hidden;background:url(http://www.pk63.net/Images/close.gif) no-repeat 0 0;cursor:pointer;}
#clStyle.hover{background-position:-18px 0;}

.AyStyle{background: url(http://www.pk63.net/Images/indexbg.jpg) no-repeat center top #fff;}
/* aoyun End */
</style>
</head>

<body class="AyStyle">
<!-- aoyun start -->
<div id="toolbar" style="height:32px;"></div>
<div id="clStyle" title="关闭背景"></div>
<script language="javascript" type="text/javascript">
<!--
g("clStyle").onclick = function(){
 document.body.className = "";
 g("toolbar").style.display = "none";
 this.style.display = "none";
};
g("clStyle").onmouseover = function(){this.className = "hover"};
g("clStyle").onmouseout = function(){this.className = ""};
//-->
</script>
<!-- aoyun end -->
<div id="layout">网页主体内容<br /></div>
</body>
</html>




 上一篇文章:控制图片最大宽度       下一篇文章:JS实现表格隔行换背景色
   (合作)  [email protected]
© CopyRight 2009-2010, PK63.NET, Inc.All Rights Reserved.
网站备案号: 版权声明 
如何获得资源分  下载帮助  联系我们