HTML弹窗登陆背景透明的情况下小窗口也跟着透明了

Riven? 2017-04-12 05:32:20
外面大的DIV设置成了透明,里面的小DIV也透明了,是不是颜色的原因?
#logn {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
background-color: #000;
/*设置透明度为60%*/
filter: alpha(opacity=60);
/*设置非IE浏览器透明度60%*/
opacity: 0.6;

/*让这个DIV浮起来*/
z-index: 20;
}

/*登陆DIV输入板*/
#out{
position: absolute;
width: 400px;
height: 300px;
top: 200px;
left: 35%;
background-color: #FFFFFF;
cursor: pointer;
z-Index: 30;
}


而且我把鼠标放在里面那个小DIV里,整个div都是个A标签, 不过点击没任何效果,只有把鼠标放在×上在点击才有效果

/*点击登陆弹开登陆DIV*/
function show(){
var s="<div id='logn'>"+
"<div id='out'>"+
"<a href='#' id='down' onclick='hide();'> ×</a>"+
"</div>"+
"</div>";
$("#landing").html(s);
logn.style.height = document.body.clientHeight + "px"; //设置隐藏层的高度为当前页面高度
}
不是用隐藏本身div 是后面添加上去的
...全文
313 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
天际的海浪 2017-04-12
  • 打赏
  • 举报
回复
小DIV不要放大DIV里,
Riven? 2017-04-12
  • 打赏
  • 举报
回复

39,087

社区成员

发帖
与我相关
我的任务
社区描述
HTML5是构建Web内容的一种语言描述方式。HTML5是互联网的下一代标准,是构建以及呈现互联网内容的一种语言方式.被认为是互联网的核心技术之一。
社区管理员
  • HTML5社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧