简单利用position, transform,rotate制作如下照片墙效果,鼠标点击放大当前图片并且覆盖其他照片。
主体部分:index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
#链接样式部分
<link rel="stylesheet" type="text/css" href="css/new_file.css"/>
</head>
<body>
<div class="box" id="box">
#以下为图片地址
<img src="img/10.jpg" >
<img src="img/2.jpg" >
<img src="img/3.jpg" >
<img src="img/4.jpg" >
<img src="img/5.jpg" >
<img src="img/6.jpg" >
<img src="img/7.jpg" >
<img src="img/8.jpg" >
<img src="img/9.jpg" >
<img src="img/1.jpg" >
</div>
</body>
</html>
CSS部分:new_file.css
div img:nth-child(even){
width: 200px;
}
div img:nth-child(odd){
width: 300px