分享一个用CSS 3.0实现的正方体3D效果,效果如下:
以下是代码实现:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>转旋盒模型</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
list-style: none;
}
#div1 {
width: 200px;
height: 200px;
background: rgba(0, 0, 0, 0);
float: left;
position: absolute;
left: 50%;
top: 50%;
margin: -100px 0 0 -100px;
transform: perspective(800px) ro