html部分:
<img src="images/8-1.jpg">
js部分:
css部分:
top: 130px;
left: 160px;
opacity: 0.2;
cursor: pointer; /鼠标小手/
}
.btn:hover,.btn:focus{ /focus 取得焦点状态/
background-color: #8AA7F9;
opacity: 0.5;
color: #FFFFFF;
}
.modalBox{
display: none;
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
z-index: 1000;
background-color: rgba(0,0.5);
}
.modalBox-matter{
display: flex; //弹性布局/
flex-flow: column nowrap;
justify-content: space-between; /两端对齐*/
width: 50%;
height: 80%;
margin: 30px auto 100px;
border-radius:10px;
-webkit-animation: zoom 0.6s;
animation: zoom 0.6s;
resize: both;
overflow: auto;
}
@keyframes zoom{
from {transform: scale(0)}
to {transform: scale(1)}
}
.modalBox-header{
margin-left: 617px;
}
.mtclose{
color: #602E2A;
font-size: 3em;
font-weight: bold;
transition: all 0.3s;
/z-index: 1010; /
}
.mtclose:hover,.mtclose:focus{
color: #602E2A;
cursor: pointer;
}
.modalBox-body{
padding: 10px;
font-size: 16px;
}
原文链接:https://www.f2er.com/js/36576.html