码迷,mamicode.com
首页 > 其他好文 > 详细

立体图

时间:2015-12-09 00:14:28      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<style>
.cube {
position: absolute;
top: 200px;
left: 200px;
width: 200px;
height: 200px;
-webkit-perspective: 450px;
-webkit-transform-style: preserve-3d;
-webkit-perspective-origin: -100% -50%;
}
.cube>div {
display: block;
position: absolute;
width: 100px;
height: 100px;
line-height: 100px;
font-size: 60px;
color: white;
text-align: center;
}
.id0 {
border: 1px dashed black;
background: transparent;
}
.id1 {
border: none;
background: rgba(0,0,0,0.3);
-webkit-transform: translateZ(50px);
}
.id2 {
background: rgba(0,255,0,1);
-webkit-transform: translateZ(-50px);
}
.id3 {
background: rgba(196,0,0,0.7);
-webkit-transform: rotateY(90deg) translateZ(-50px);
}
.id4 {
background: rgba(0,0,196,0.7);
-webkit-transform: rotateY(-90deg) translateZ(-50px);
}
.id5 {
background: rgba(196,196,0,0.7);
-webkit-transform: rotateY(90deg) translateZ(-50px);
}
.id6 {
background: rgba(196,0,196,0.7);
-webkit-transform: rotateY(-90deg) translateZ(-50px);
}
</style>
<body>
<div class="cube">
<div class="id0"></div>
<div class="id1">1</div>
<div class="id2">2</div>
<div class="id3">3</div>
<div class="id4">4</div>
<div class="id5">5</div>
<div class="id6">6</div>
</div>
</body>
</html>

立体图

标签:

原文地址:http://www.cnblogs.com/chengwangjun/p/5031256.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!