3D视图正方体:

 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS3景深-perspective</title>
</head>
<style>
#div1{
position: relative;
width: 500px;
height: 500px;
perspective: 1000px; /* 景深 面的 (宽+高)*2 */
background-color: #123456;
}
#div1 ul{
transform-origin: 50% 50%; /* 旋转中心 */
position: absolute;
left: 50%;
top: 50%;
width: 250px;
height: 250px;
transform-style: preserve-3d; /* 设置3D属性让子元素三维空间呈现 */
list-style: none;
margin: -125px 0 0 -125px;
padding: 0;
font-size: 120px;
animation: move 6s linear infinite; /* 动画效果 */
/*border: 10px solid #000;*/
/*box-sizing: border-box;*/
}
#div1 ul li{
width: 100%;
height: 100%;
position: absolute;
opacity: 0.8;
box-sizing: border-box;
border: 10px solid orange;
}
#div1 ul li i{
position: absolute;
font-style: normal;
top: 50%;
left: 50%;
transform:translate(-50%,-50%);
background-color: #fff;
}
#div1 ul li:nth-child(1){
background-color: red;
transform: translateX(-125px) rotateY(90deg);
}
#div1 ul li:nth-child(2){
background-color: green;
transform: translateX(125px) rotateY(-90deg);
}
#div1 ul li:nth-child(3){
background-color: yellow;
transform: translateY(-125px) rotateX(90deg);
}
#div1 ul li:nth-child(4){
background-color: black;
transform: translateY(125px) rotateX(-90deg);
}
#div1 ul li:nth-child(5){
background-color: pink;
transform: translateZ(-125px);
}
#div1 ul li:nth-child(6){
background-color: blue;
transform: translateZ(125px);
}
@keyframes move{
0% {
transform: rotateX(0deg);
}
25% {
transform: rotateX(180deg);
}
50% {
transform: rotateX(360deg) rotateY(0deg);
}
75% {
transform: rotateX(360deg) rotateY(180deg);
}
100% {
transform: rotateX(360deg) rotateY(360deg);
}
}
/*==================================================================*/
</style>
<body>
<div id="div1">
<ul>
<li> <i>

最新文章

  1. Centos YUM 升级PHP
  2. [2]项目创建-使用C#.NET开发基于本地数据缓存的PC客户端
  3. DB2LOOK命令提取数据库对象信息
  4. zoj2770 差分约束系统
  5. 手动安装python后,交互模式下退格键乱码
  6. IOS网络请求原理
  7. [整理]C#反射(Reflection)详解
  8. rsync+inotify实时同步环境部署记录
  9. EditPlus保存文件时不生成其备份文件的方法
  10. 十月例题F题 - City Game
  11. 剑指offer-面试题12.打印1到最大的n位数
  12. 查看文章strncpy()功能更好的文章
  13. apt-get 总结2
  14. halcon 模板匹配(最简单)
  15. ORACLE分页SQL语句(转载)
  16. Nginx 集群 反向代理多个服务器
  17. C++中extern “C”含义及extern、static关键字浅析
  18. Git使用基础篇
  19. 【LeetCode】166. Fraction to Recurring Decimal
  20. 解决同一程序在并行同时调用时,出现资源等待错误-使用DBMS_LOCK.sleep

热门文章

  1. [Linux/Ubuntu] vi/vim 使用方法讲解
  2. 本地调用QQ只需要一句代码
  3. Testing - 软件测试知识梳理 - 测试阶段
  4. JSTL-简介
  5. 【xsy1300】 原题的旅行 最短路+倍增
  6. Koa 框架教程
  7. python之斐波那契数列递归推导在性能方面的反思
  8. C# signtool error:no certificates were found that met all the given criteria 错误解决方案
  9. Windows环境下使用bitvise架构sftp服务器
  10. 配置文件热加载的go语言实现