<!DOCTYPE html>
<html>
<head>
<title>test</title>
<link rel="stylesheet" type="text/css" href="css/Css1.css">
</head>
<body>
<div id="Continer">
<div class="Continer-nav">
<div class="Continer-Raster">
<div class="item"><img src="img/1.jpg"><p>1</p></div>
<div class="item1"><img src="img/1.jpg"><p>2</p></div>
<div class="item2"><img src="img/1.jpg"><p>3</p></div>
<div class="item3"><img src="img/1.jpg"><p>4</p></div>
<div class="item4"><img src="img/1.jpg"><p>1</p></div>
<div class="item5"><img src="img/1.jpg"><p>2</p></div>
<div class="item6"><img src="img/1.jpg"><p>3</p></div>
<div class="item7"><img src="img/1.jpg"><p>4</p></div>
</div>
</div>
</div>
<div id="foot">
<div class="footer">
<p>版本号 v6.0</p>
</div>
</div>
</body>
</html>
#Continer {
width: 100%;
height: 30%;
}
#Continer .Continer-nav {
width: 1200px;
height: 30%;
margin: 0 auto;
}
#Continer .Continer-Raster {
display: grid;
grid-template-columns: 250px 250px 250px 250px;
grid-gap: 5%;
grid-template-rows: 200px;
margin: 5%;
padding: 5%;
margin: 0 auto;
}
.Continer-Raster img {
width: 250px;
height: 200px;
position: relative;
top: 0;
transition: .5s;
border-radius: 2px;
float: left;
margin: 0 auto;
}
.Continer-Raster img:hover {
top: -3px;
box-shadow: 0px 5px 10px 3px;
}
.Continer-Raster p {
text-align: center;
}
#foot {
width: 100%;
height: 30%;
min-height: 100px;
position: relative;
}
#foot .footer {
width: 100%;
height: 30%;
position: absolute;
bottom: 0px;
left: 0px;
border-radius: 3px;
background: #ddd;
text-align: center;
}