全屏友情提示
来源:互联网 发布:php发布流程 编辑:程序博客网 时间:2024/05/01 23:31
css代码:
*{...}{
padding:0;
margin:0;
font-size:12px;
}
#bg{...}{
background:#000000;
opacity: 0.5;
-moz-opacity:0.5;
filter:alpha(opacity=50);
width:100%;
height:100%;
position:absolute;
top:0;
left:0
}
#info{...}{
height:0px;
width:0px;
top:50%;
left:50%;
position:absolute;
line-height:1.7
}
#center{...}{
background:#fff;
border:1px solid #217AC1;
width:300px;
height:100px;
position:absolute;
margin:-50px -150px;
}
#center strong{...}{
display:block;
padding:2px 5px;
background:#EBF4FC;
color:#519FEE;
}
#center p{...}{
padding:10px;
text-align:center;
color:#1C6FB8;
}
padding:0;
margin:0;
font-size:12px;
}
#bg{...}{
background:#000000;
opacity: 0.5;
-moz-opacity:0.5;
filter:alpha(opacity=50);
width:100%;
height:100%;
position:absolute;
top:0;
left:0
}
#info{...}{
height:0px;
width:0px;
top:50%;
left:50%;
position:absolute;
line-height:1.7
}
#center{...}{
background:#fff;
border:1px solid #217AC1;
width:300px;
height:100px;
position:absolute;
margin:-50px -150px;
}
#center strong{...}{
display:block;
padding:2px 5px;
background:#EBF4FC;
color:#519FEE;
}
#center p{...}{
padding:10px;
text-align:center;
color:#1C6FB8;
}
javascript代码:
function boxs(v)...{
window.scrollTo(0,0);
var bo = document.getElementsByTagName('body')[0];
var ht = document.getElementsByTagName('html')[0];
var boht = document.getElementById('boxs');
boht.innerHTML = '';
bo.style.height='auto';
bo.style.overflow='auto';
ht.style.height='auto';
if(v == 1)...{
bo.style.height='100%';
bo.style.overflow='hidden';
ht.style.height='100%';
boht.innerHTML = '<div id="bg"></div><div id="info"><div id="center"><strong>友情提醒:</strong><p><a href="javascript:boxs(0);">关了我吧!</a></p></div></div>';
}
}
window.scrollTo(0,0);
var bo = document.getElementsByTagName('body')[0];
var ht = document.getElementsByTagName('html')[0];
var boht = document.getElementById('boxs');
boht.innerHTML = '';
bo.style.height='auto';
bo.style.overflow='auto';
ht.style.height='auto';
if(v == 1)...{
bo.style.height='100%';
bo.style.overflow='hidden';
ht.style.height='100%';
boht.innerHTML = '<div id="bg"></div><div id="info"><div id="center"><strong>友情提醒:</strong><p><a href="javascript:boxs(0);">关了我吧!</a></p></div></div>';
}
}
html代码:
<span id="boxs"></span>
<a href="javascript:boxs(1);">点这里测试一下</a>
<a href="javascript:boxs(1);">点这里测试一下</a>
效果:
*{ padding:0; margin:0; font-size:12px;}#bg{background:#000000;opacity: 0.5;-moz-opacity:0.5; filter:alpha(opacity=50); width:100%; height:100%;position:absolute; top:0; left:0}#info{height:0px; width:0px;top:50%; left:50%;position:absolute; line-height:1.7}#center{background:#fff;border:1px solid #217AC1;width:300px; height:100px; position:absolute; margin:-50px -150px;}#center strong{ display:block; padding:2px 5px; background:#EBF4FC; color:#519FEE;}#center p{padding:10px; text-align:center; color:#1C6FB8;}测试!- 全屏友情提示
- 继承设计友情提示
- 国家地震局专家友情提示
- 本博友情提示
- P2P理财友情提示
- P2P理财友情提示
- 公告:友情提示
- 友情
- 友情
- 友情
- 友情
- 友情提示:破坏计算机信息系统罪
- 友情提示,你的重要资料今天备份了吗?
- 友情不定期提示,你的重要数据备份了吗?
- 干掉sina sae的友情提示 , 未实名认证
- 关于android中对异常的友情提示做处理。
- 弹出信息提示窗口的代码;在Windows系统桌面右下角弹出友情提示窗口
- OleDbParameter在Access数据库Insert时参数不对应的怪现象[友情提示]
- 无厘头
- 无题
- 对添富优势只能无言
- 用zotero管理网络资料
- 数据库连接类
- 全屏友情提示
- 谢谢大家对SAID4关注
- 用VB开发进程管理软件
- ACE编程
- 一个google高手写的心得体会
- 【抄摘MSDN】添加自定义系统必备
- 网页色彩搭配的一些技巧
- 童话II
- Solaris 的 Secure by Default