博客
关于我
3D案例——旋转木马
阅读量:365 次
发布时间:2019-03-05

本文共 1445 字,大约阅读时间需要 4 分钟。

运用transform元素

<!DOCTYPE html><html lang="en"><head>  <meta charset="UTF-8">  <title>Title</title>  <style type="text/css">    * {          margin: 0;      padding: 0;    }    body{          perspective: 1000px;    }    section{          width:310px;      height:430px;      margin: 100px auto;      background: url("image/pk1.png") no-repeat;      background-size: cover;      position: relative;      transform-style: preserve-3d;      transition: all 5s linear;    }    section:hover{          transform: rotateY(360deg);      animation-iteration-count: infinite;    }    section div{          width:100%;      height:100%;      background: url("image/pk1.png") no-repeat;      position: absolute;      top: 0;      left:0;    }    section div:nth-child(1){          transform: rotateY(0deg) translateZ(400px);    }    section div:nth-child(2){          transform: rotateY(60deg) translateZ(400px);    }    section div:nth-child(3){          transform: rotateY(120deg) translateZ(400px);    }    section div:nth-child(4){          transform: rotateY(180deg) translateZ(400px);      }    section div:nth-child(5){          transform: rotateY(240deg) translateZ(400px);        }    section div:nth-child(6){          transform: rotateY(300deg) translateZ(400px);    }  </style></head><body>    <section>        <div></div>        <div></div>        <div></div>        <div></div>        <div></div>        <div></div>    </section></body></html>

转载地址:http://bgog.baihongyu.com/

你可能感兴趣的文章
Web前端安全策略之CSRF的攻击与防御
查看>>
5分钟快速了解下CSS4 color-adjust属性
查看>>
纯客户端页面关键字搜索高亮jQuery插件
查看>>
秋月何时了,CSS3 border-radius知多少?
查看>>
linux运维中常用的命令
查看>>
M1芯片的macbook安装王者荣耀,原神,崩坏方法
查看>>
CentOS7更改成阿里云的源
查看>>
Java温故而知新-反射机制
查看>>
Netty3事件处理顺序问题
查看>>
eclipse引用sun.misc开头的类
查看>>
firefox中angular2嵌套发送请求问题
查看>>
Netty 知识整理 (2)HttpServerCodec和HttpObjectAggregator用法
查看>>
【Linux】service命令
查看>>
【mysql】事务隔离与mvcc的误区
查看>>
【mybatis3】调试/断点打印日志
查看>>
【linux】pid file解读
查看>>
Leetcode 102题.从中序与后序遍历序列构造二叉树
查看>>
C++
查看>>
[CTFSHOW]PHP特性
查看>>
navigator对象
查看>>