当前位置:asp编程网>技术教程>Css3教程>  正文

CSS将层固定在右下角特效

2009-07-13 15:45:07   来源:www.aspprogram.cn    作者:佚名   浏览量:1955   收藏

[code]<!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>CSS将层固定在右下角特效</title>
<style type="text/css">
* { margin:0; padding:0;}
#content{ height:2000px; }
#a{ position:fixed; bottom:0; right:0; width:250px; height:auto; background:#F00;padding-right:5px; padding-left:10px; font-size:12px;}
#a span{
   cursor:hand;
   float:right;    
}
* html{overflow:hidden;}
* html body{height:100%;overflow:auto;}
* html #a{position:absolute;right:18px;}
</style>
</head>
<body>
<script language="javascript">
function fclose()
{
    document.getElementById("a").style.display='none';
}
</script>
<div id="content">
CSS将层固定在右下角代码
</div>
<div id="a"><span onclick="fclose();">Close</span><br />此为被固定的层<br />此为被固定的层<br />此为被固定的层</div>
</body>
</html>[/code]



关于我们-广告合作-联系我们-积分规则-网站地图

Copyright(C)2013-2017版权所属asp编程网