纯CSS3制作炫酷的3D相册
整体效果如下所示:
整体代码如下所示:
html中的代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D炫酷相册</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<div class="container">
<div class="cube">
<!-- 外面立方体开始 -->
<div class="out_front">
<img src="img/1.jpg" class="out_pic"/>
</div>
<div class="out_back">
<img src="img/2.jpg" class="out_pic"/>
</div>
<div class="out_left">
<img src="img/3.jpg" class="out_pic"/>
</div>
<div class="out_right">
<img src="img/4.jpg" class="out_pic"/>
</div>
<div class="out_top">
<img src="img/5.jpg" class="out_pic"/>
</div>
<div class="out_bottom">
<img src="img/6.jpg" class="out_pic"/>
</div>
<!-- 外面立方体结束 -->
<!-- 里面立方体开始 -->
<div class="in_front" id="small">
<img src="img/7.jpg" class="in_pic"/>
</div>
<div class="in_back" id="small">
<img src="img/8.jpg" class="in_pic"/>
</div>
<div class="in_left" id="small">
<img src="img/9.jpg" class="in_pic"/