作家
登录

javascript 遮照层效果

作者: 来源:www.28hudong.com 2013-03-30 02:19:56 阅读 我要评论

想了想,还是发出来吧.虽然面向对象还不是很明白. * { padding:0; margin:0; list-style:none; } html{ height:100%;} body { font-family:Verdana, Geneva, sans-serif; font-size:14px;height:100%; line-height:26px; } #wrap { width:960px; margin:0 auto; height:auto; } #divId_no_click { position:absolute; display:none; top:0; left:0; width: 100%; height:100%; background-color: #555; z-index: 9999; filter: alpha(opacity=10); opacity:0.3; } OK [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]还可以把上篇文章的弹出层居中效果的制作和本例一起加个 * { padding:0; margin:0; list-style:none; } #a { width:380px; height:80px; border:5px solid #d3d3d3; background-color:#f7f7f7; position:absolute; padding:10px; z-index:999999; } a.btn { display:block; width:80px; cursor:pointer; background-color:#f7f7f7; padding:2px 0px; border:1px solid #d5d5d5; vertical-align:middle; text-align:center; margin:50px auto 5px; text-decoration:none; } a:hover { background-color:#333; color:#fff; font-weight:bold; } html { height:100%; } body { font-family:Verdana, Geneva, sans-serif; font-size:14px; height:100%; line-height:26px; } #wrap { width:960px; margin:0 auto; height:auto; } #divId_no_click { position:absolute; display:none; top:0; left:0; width: 100%; height:100%; background-color: #555; z-index: 9999; filter: alpha(opacity=10); opacity:0.3; } #aa { position:fixed; bottom:20px; right:10px; } [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 主要代码: 复制代码 代码如下:var Class = { min_w:960, bint: function(r) { $(r).style.display = "block"; $(r).style.height =Math.max(parseInt(document.documentElement.scrollHeight),parseInt(document.documentElement.offsetHeight))+ "px"; $(r).style.width = Math.max(parseInt(document.body.offsetWidth),Class.min_w)+"px"; }, x: function(r,d) { for (i = 1; i < r; i++) { var c = document.createElement("div"); c.innerHTML = i; $(d).appendChild(c); } }, res: function(r,wr) { $(r).style.width = Math.max(parseInt(document.body.offsetWidth),Class.min_w)+"px"; $(r).style.height =Math.max(parseInt(document.documentElement.scrollHeight),parseInt(document.documentElement.offsetHeight))+ "px"; } };

  推荐阅读

  ext 同步和异步示例代码

同步调用的相关文档就少一些。一下是同步示例,即页面在加载时,或者这个js被调用到时,程序会一行一行的往下走,这在获取页面初始化需要数据或者样式等一些功能会用到。 示例代码: 复制代码 代码如下://判断按钮>>>详细阅读


本文标题:javascript 遮照层效果

地址:http://www.17bianji.com/kaifa2/JS/28106.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)