console
<!DOCTYPE HTML>
<html>
<head>
<title>遮罩层大图</title>
<meta charset="UTF-8">
<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".piclist").on("click",function(){
$(".cur_big_pic").attr("src",$(this).attr("src"));
$(".top_level").show();
});
$(".close_top").on("click",function(){
$(".top_level").hide();
});
});
</script>
<style>
ul{
list-style: none;
}
ul li{
padding:5px;
float:left;
}
.piclist{
width:200px;
height:400px;
cursor:pointer;
}
.top_level{
display:none;
position:absolute;
width:100%;
height:100%;
background:#000000;
overflow:hidden;
}
.close_top{
padding:20px;
cursor:pointer;
color:#ffffff;
background:#00ff00;
}
</style>
</head>
<body>
<div>
<ul>
<li><img class="piclist" src="https://tse1-mm.cn.bing.net/th/id/OIP-C.Zte3ljd4g6kqrWWyg-8fhAHaEo?w=314&h=196&c=7&r=0&o=5&pid=1.7"/></li>
</ul>
</div>
<div class="top_level">
<div><span class="close_top">X</span></div>
<div><img class="cur_big_pic" src="images/error.jpg"></div>
</div>
</body>
</html>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Courier New', Courier, monospace;
background-color: #f9ebea;
color: #444444;
}
header, main, footer {
max-width: 960px;
margin: 0 auto;
padding: 20px;
}
header {
background-color: #cfb6b6;
}
h1 {
font-size: 48px;
text-align: center;
margin-bottom: 20px;
}
nav ul {
list-style: none;
display: flex;
justify-content: space-around;
}
nav li {
margin: 0 10px;
}
nav a {
text-decoration: none;
color: #ffffff;
font-size: 24px;
transition: color 0.3s ease-in-out;
}
nav a:hover {
color: #a05858;
}
main h2 {
font-size: 36px;
margin-bottom: 20px;
}
.partner-name {
font-weight: bold;
}
footer {
text-align: center;
background-color: #cfb6b6;
}
a {
color: #808080;
text-decoration: none;
font-family: "Courier New", Times, serif;
font-size: 24px;
}
a:hover {
color: #c0c0c0;
}
@media (max-width: 600px) {
h1 {
font-size: 36px;
}
nav a {
font-size: 20px;
}
main h2 {
font-size: 28px;
}
}