最近按照CSDN上博主自定义弹出框的代码,终于实现了自己想要的弹出框。并将它们记录下来。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="css/simplecss.css"/>
<style type="text/css">
.box1{
height: 620px;
border: 1px solid #ccc;
background-color: #CCCCCC;
}
.box2{
height: 620px;
border: 1px solid white;
text-align: center;
line-height: 500px;
}
.title{
text-align:center;
margin-top: 2px;
}
.bottom{
text-align: center;
margin-top: 552px;
}
/*弹出框出现后的整体背景样式*/
.light_content{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background: black;
z-index: 1001;
opacity: 0.5;
filter: alpha(opacity=60);
}
/*弹出框的样式*/
.box{
display: none;
position: abso