小练习之会动的照片墙

小练习之会动的照片墙

十一月 30, 2018

小练习之会动的照片墙

实现照片鼠标滑过放大,旋转,显示的特效

效果图展示

照片墙

代码实现

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body{
display: flex;
justify-content: center;
align-items: center;
height: 600px;
width: 100%;
}
.img{
background-size: cover;
border: 10px solid gainsboro;
height: 207px;
width: 340px;
display: flex;
position: absolute;
box-shadow:2px 2px 2px 2px #333333;
transition: ALL 0.7s ease-in;
}
.container{
background: url("../../a/a.jpg");
transform: rotate(30deg);

}
.content{
background:url("../b.jpg");
transform: rotate(60deg);
}
.img:hover{
transform: rotate(0deg);
box-shadow:5px 5px 5px 5px #333333;
transform: scale(1.5);

}
.container:hover{
z-index: 100;
}
</style>
</head>
<body>

<div class="container img">

</div>
<div class="content img">
</div>

</body>
</html>