動態照片牆

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>照片牆</title>
    <link rel="stylesheet" href="css/reset.css"/>
    <link rel="stylesheet" href="css/07style.css"/>
</head>
<body>
<h1>KrisWu</h1>
<div class="container">
    <img src="images/img2.jpg" alt="" class="pic1"/>
    <img src="images/img3.jpeg" alt="" class="pic2"/>
    <img src="images/img4.jpeg" alt="" class="pic3"/>
    <img src="images/img5.jpeg" alt="" class="pic4"/>
    <img src="images/img6.jpg" alt="" class="pic5"/>
    <img src="images/img7.jpeg" alt="" class="pic6"/>
    <img src="images/img8.png" alt="" class="pic7"/>
    <img src="images/img9.jpg" alt="" class="pic8"/>
    <img src="images/img10.jpg" alt="" class="pic9"/>
    <img src="images/img5.jpeg" alt="" class="pic10"/>
</div>
</body>
</html>
body{
    background-color: #eee;
}
h1{
    height: 84px;
    line-height: 84px;
}
.container{
    width: 960px;
    height: 450px;
    margin: 0 auto;
    position: relative;
}
.container>img{
    position: absolute;
    padding: 10px;
    border: 1px solid #eeeeee;
    background-color: #fff;
    transition: all 1s;
}
.pic1{
    top: 0;
    right: 160px;
    transform: rotate(-20deg);
}
.pic2{
    left: 160px;
    bottom: -20px;
    transform: rotate(5deg);
}
.pic3{
    top: 0;
    left: 425px;
    transform: rotate(-5deg);
}
.pic4{
    top: 30px;
    left: 170px;
    transform: rotate(-10deg);
}
.pic5{
    top: 0;
    left: 0;
    transform: rotate(10deg);
}
.pic6{
    top: 0;
    right: 0;
    transform: rotate(20deg);
}
.pic7{
    left: -45px;
    bottom: 0;
    transform: rotate(-10deg);
}
.pic8{
    bottom: 0;
    right: 155px;
    transform: rotate(20deg);
}
.pic9{
    right: 30px;
    bottom: -30px;
    transform: rotate(5deg);
}
.pic10{
    left: 300px;
    bottom: -10px;
    transform: rotate(-10deg);
}
.container>img:hover{
    transform: scale(1.1);
    z-index: 66;
    box-shadow: 0 15px 30px rgba(0,0,0,.2);
}
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, legend, input, textarea, button, p, blockquote, th, td{margin: 0;padding: 0;}
body {padding:0;margin:0;text-align:center;color:#333;font-size:14px;font-family:"ו", arial;}
li{list-style-type:none;}
a{text-decoration: none;}
img,input,button{border:none;vertical-align:middle;}

效果
在這裏插入圖片描述
源代碼下載https://download.csdn.net/download/weixin_44368963/12793833

css

相關文章
相關標籤/搜索