弹出叠加页面
Pop up and overlay page
我创建了一个带有叠加层的弹出页面(单独的页面加载到 div),但是我关闭弹出窗口的选项没有显示。
这是弹出窗口 window 的 link:
http://jymeross.com/project5.html
如何让收盘价 window (.cancel class) 出现? "X" link 目前只显示在这里:
http://jymeross.com/project5.html#loginScreen
这是代码
<head>
<link rel="stylesheet" href="slider1.css" type="text/css" charset="utf-8" />
<style type="text/css">
.button
{
width: 150px;
padding: 10px;
background-color: #FF8C00;
box-shadow: -8px 8px 10px 3px rgba(0,0,0,0.2);
font-weight:bold;
text-decoration:none;
}
#cover{
position:fixed;
top:0;
left:0;
background:rgba(0,0,0,0.6);
z-index:50;
width:100%;
height:100%;
display:none;
}
#gallery
{
height:525px;
width:675px;
margin:0 auto;
position: relative;
z-index:100;
display:none;
border:5px solid #cccccc;
border-radius:10px;
}
#gallery:target, #gallery:target + #cover{
display: block;
opacity:2;
}
.cancel
{
display:block;
position:absolute;
z-index:100;
top:3px;
right:2px;
height:30px;
width:35px;
font-size:30px;
text-decoration:none;
}
</style>
</head>
<body>
<br><br>
<div align="center">
<a href="#gallery" onclick="load_project1()" class="button">View Gallery</a>
</div><!--close center-->
<div id="gallery">
<a href="#" class="cancel">×</a>
</div><!--close gallery-->
<div id="cover">
</div>
<script>
function load_project1() {
document.getElementById("gallery").innerHTML='<object type="text/html" width="575" height="325" data="project1.html"></object>';
}
</script>
</body>
在图库下创建子div,然后将内容加载到div。
<div id="gallery">
<a href="#" class="cancel">×</a>
<div id="gallery-body"></div>
</div>
function load_project1() {
document.getElementById("gallery-body").innerHTML='<object type="text/html" width="575" height="325" data="project1.html"></object>';
}
那你就在link附近。
我创建了一个带有叠加层的弹出页面(单独的页面加载到 div),但是我关闭弹出窗口的选项没有显示。
这是弹出窗口 window 的 link: http://jymeross.com/project5.html
如何让收盘价 window (.cancel class) 出现? "X" link 目前只显示在这里: http://jymeross.com/project5.html#loginScreen
这是代码
<head>
<link rel="stylesheet" href="slider1.css" type="text/css" charset="utf-8" />
<style type="text/css">
.button
{
width: 150px;
padding: 10px;
background-color: #FF8C00;
box-shadow: -8px 8px 10px 3px rgba(0,0,0,0.2);
font-weight:bold;
text-decoration:none;
}
#cover{
position:fixed;
top:0;
left:0;
background:rgba(0,0,0,0.6);
z-index:50;
width:100%;
height:100%;
display:none;
}
#gallery
{
height:525px;
width:675px;
margin:0 auto;
position: relative;
z-index:100;
display:none;
border:5px solid #cccccc;
border-radius:10px;
}
#gallery:target, #gallery:target + #cover{
display: block;
opacity:2;
}
.cancel
{
display:block;
position:absolute;
z-index:100;
top:3px;
right:2px;
height:30px;
width:35px;
font-size:30px;
text-decoration:none;
}
</style>
</head>
<body>
<br><br>
<div align="center">
<a href="#gallery" onclick="load_project1()" class="button">View Gallery</a>
</div><!--close center-->
<div id="gallery">
<a href="#" class="cancel">×</a>
</div><!--close gallery-->
<div id="cover">
</div>
<script>
function load_project1() {
document.getElementById("gallery").innerHTML='<object type="text/html" width="575" height="325" data="project1.html"></object>';
}
</script>
</body>
在图库下创建子div,然后将内容加载到div。
<div id="gallery">
<a href="#" class="cancel">×</a>
<div id="gallery-body"></div>
</div>
function load_project1() {
document.getElementById("gallery-body").innerHTML='<object type="text/html" width="575" height="325" data="project1.html"></object>';
}
那你就在link附近。