博客
关于我
3D案例——旋转木马
阅读量:364 次
发布时间: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/

你可能感兴趣的文章
Java笔记:单链表
查看>>
Java基础题:小根堆为8,15,10,21,34,16,12,删除关键字8之后需重建堆,需要的比较次数为?
查看>>
Java基础题:哈夫曼树
查看>>
Java中的深拷贝和浅拷贝
查看>>
phthon基本语法——温习
查看>>
sleep、wait、yield、join——简介
查看>>
web项目配置
查看>>
《图解Vue3.0》- 第2节 Vue项目搭建
查看>>
VTK:相互作用之KeypressEvents
查看>>
VTK:相互作用之MouseEventsObserver
查看>>
VTK:相互作用之PickableOff
查看>>
VTK:相互作用之Picking
查看>>
VTK:相互作用之SelectAnActor
查看>>
VTK:灯光之SpotLights
查看>>
VTK:Medical之MedicalDemo1
查看>>
VTK:Medical之MedicalDemo2
查看>>
libfacedetection库的配置及基本使用——内涵(cmake编译libfacedetection库)
查看>>
VS配置属性表,保存Opencv配置信息
查看>>
c语言(基本数据类型)实参与形参传值 用汇编理解
查看>>
三极管c b e o的意义
查看>>