图片廊
代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>图片廊</title>
<style type="text/css" media="screen">
img{
width:160px;
height:140px;
}
div.decrp{
padding:5px;
border:1px solid lightcyan;
width:146px;
text-align:center;
background-color:lavenderblush;
}
div.img{
border:solid paleturquoise;
width:160px;
float:left;
margin:60px;
}
div.img:hover{
border:2px solid skyblue;
}
div.frist{
width:570px;
height:590px;
background-color:pink;
border-radius:30px;
border:1px solid lightblue;
margin:0 auto;
}
</style>
</head>
<body>
<div class="frist">
<div class="img">
<a href="C:\Users\Lenovo\Pictures\Saved Pictures\73.jpg" target="_blank">
<img src="C:\Users\Lenovo\Pictures\Saved Pictures\73.jpg" alt="图片文本描述">
</a>
<div class="decrp">图片文本描述</div>
</div>
<div class="img">
<a href="C:\Users\Lenovo\Pictures\Saved Pictures\26.jfif" target="_blank">
<img src="C:\Users\Lenovo\Pictures\Saved Pictures\26.jfif" alt="">
</a>
<div class="decrp">图片文本描述</div>
</div>
<div class="img">
<a href="C:\Users\Lenovo\Pictures\Saved Pictures\27.jfif" target="_blank">
<img src="C:\Users\Lenovo\Pictures\Saved Pictures\27.jfif" alt="">
</a>
<div class="decrp">图片文本描述</div>
</div>
<div class="img">
<a href="C:\Users\Lenovo\Pictures\Saved Pictures\30.jpg" target="_blank">
<img src="C:\Users\Lenovo\Pictures\Saved Pictures\30.jpg" alt="">
</a>
<div class="decrp">图片文本描述</div>
</div>
</div>
</body>
</html>
成果: