(六)HTML5立方体动画设置

- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>立方体动画</title>
- <style type="text/css">
- body,div,p,ul,ol,li,dl,dt,dd,table,tr,td,form,hr,fieldset,h1,h2,h3,h4,h5,h6,img,input{
- margin:0;
- padding:0;
- }
- html,body{
- height: 100%;
- }
- body{
- /*background: url(img/body_bg.png) repeat-x;*/
- background-size: 100% 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .box{
- width: 200px;
- height: 200px;
- /*background: blue;*/
- transform-style: preserve-3d;
- /*transform:rotateY(30deg) rotateX(-15deg);*/
- animation:lft_ani 8s infinite linear;
- }
- .box a{
- display: block;
- opacity: .4;
- border: 1px solid black;
- transform-style:preserve-3d;
- }
- .box .small{
- width: 100px;
- height: 100px;
- background: #18fa07;
- position: absolute;
- left: 50px;
- top: 50px;
- }
- .box .big{
- width: 200px;
- height: 200px;
- background:#2501fd;
- position: absolute;
- left: 0;
- top: 0;
- transition: all 1s;
- }
- .box .big:nth-of-type(1){
- transform:translateZ(100px);
- }
- .box .big:nth-of-type(2){
- transform:translateZ(-100px);
- }
- .box .big:nth-of-type(3){
- transform:rotateY(-90deg) translateZ(100px);
- }
- .box .big:nth-of-type(4){
- transform:rotateY(90deg) translateZ(100px);
- }
- .box .big:nth-of-type(5){
- transform:rotateX(90deg) translateZ(100px);
- }
- .box .big:nth-of-type(6){
- transform:rotateX(-90deg) translateZ(100px);
- }
- .box:hover .big:nth-of-type(1){
- transform:translateZ(150px);
- }
- .box:hover .big:nth-of-type(2){
- transform:translateZ(-150px);
- }
- .box:hover .big:nth-of-type(3){
- transform:rotateY(-90deg) translateZ(150px);
- }
- .box:hover .big:nth-of-type(4){
- transform:rotateY(90deg) translateZ(150px);
- }
- .box:hover .big:nth-of-type(5){
- transform:rotateX(90deg) translateZ(150px);
- }
- .box:hover .big:nth-of-type(6){
- transform:rotateX(-90deg) translateZ(150px);
- }
- .box:hover{
- animation:lft_ani 8s infinite linear paused;
- }
- .box .small:nth-of-type(7){
- transform:translateZ(50px);
- }
- .box .small:nth-of-type(8){
- transform:translateZ(-50px);
- }
- .box .small:nth-of-type(9){
- transform:rotateY(-90deg) translateZ(50px);
- }
- .box .small:nth-of-type(10){
- transform:rotateY(90deg) translateZ(50px);
- }
- .box .small:nth-of-type(11){
- transform:rotateX(90deg) translateZ(50px);
- }
- .box .small:nth-of-type(12){
- transform:rotateX(-90deg) translateZ(50px);
- }
- @keyframes lft_ani{
- 0%{
- transform:rotateX(0deg) rotateY(0deg);
- }
- 100%{
- transform:rotateX(360deg) rotateY(360deg);
- }
- }
- </style>
- </head>
- <body>
- <div class="box">
- <a href="#" class="big"></a>
- <a href="#" class="big"></a>
- <a href="#" class="big"></a>
- <a href="#" class="big"></a>
- <a href="#" class="big"></a>
- <a href="#" class="big"></a>
- <a href="#" class="small"></a>
- <a href="#" class="small"></a>
- <a href="#" class="small"></a>
- <a href="#" class="small"></a>
- <a href="#" class="small"></a>
- <a href="#" class="small"></a>
- </div>
- </body>
- </html>
(六)HTML5立方体动画设置的更多相关文章
- HTML5 3D动画效果
对以前来讲,3D动画拿到网页上展示是一件非常奢侈的事情,第一是浏览器不够先进,第二是大部分只能用flash实现伪3D.HTML5的出现,让实现网页3D动画变得非常简单,当然前提是你不要再使用像IE67 ...
- 7款超酷HTML5 3D动画精选应用及源码
对以前来讲,3D动画拿到网页上展示是一件非常奢侈的事情,第一是浏览器不够先进,第二是大部分只能用flash实现伪3D.HTML5的出现,让实现网页3D动画变得非常简单,当然前提是你不要再使用像IE67 ...
- 超给力的HTML5 3D动画欣赏及源码下载
HTML5有着非常巨大的魅力,尤其是CSS3和Cavnas,可以帮助页面渲染得非常炫酷.值得一提的是,利用HTML5的3D特性可以帮助你更加方便地在网页上实现3D动画特效.本文分享的这些HTML5 3 ...
- 基于HTML5/CSS3可折叠的3D立方体动画
今天要给大家带来另外一款CSS3 3D立方体动画,尤其在DEMO2中可以看到,鼠标滑过立方体后,它将会被打开,从里面弹出另外一个小立方体,动画效果非常酷,非常逼真. 在线预览 源码下载 实现的代码 ...
- 【转】15个无比华丽的HTML5/CSS3动画应用
原文转自:http://www.html5cn.org/article-7089-1.html 前几天,HTML5标准已经尘埃落定,未来的Web将会是由HTML5主导,当然作为开发者对这一喜讯更为动心 ...
- 8个经典炫酷的HTML5 Canvas动画欣赏
HTML5非常强大,尤其是Canvas技术的应用,让HTML5几乎可以完成所有Flash能完成的效果.本文精选了8个经典炫酷的HTML5 Canvas动画欣赏,每一个都提供全部的源代码,希望对你有所帮 ...
- 8款效果惊艳的HTML5 3D动画
1.HTML5 WebGL水面水波荡漾特效 之前已经向各位分享过一款很逼真的HTML5水波荡漾特效,效果还算不错.今天再向大家分享一款更加给力的HTML5水波动画,画面上是一个大水池,水池底部是一颗大 ...
- 纯CSS3超酷3D旋转立方体动画特效
简要教程 这是一款神奇的纯 CSS3 立方体动画特效插件.使用CSS3来制作动画效果已经成为WEB前端开发的一种时尚,从简单的颜色和尺寸动画,到复杂的旋转.翻转动画, CSS3 展现了它无穷的魅力.使 ...
- 14款超时尚的HTML5时钟动画
时钟动画在网页应用中也非常广泛,在一些个人博客中,我们经常会看到一些相当个性化的HTML5时钟动画.今天我们向大家分享了14款形态各异的超时尚HTML5时钟动画,其中有圆盘时钟.3D时钟.个性化时钟等 ...
随机推荐
- 手动创建sql数据表
createtable tb ( ID int IDENTITY (1,1) notnull, --创建列ID,并且每次新增一条记录就会加1 WokNo ...
- vue2.0 transition 多个元素嵌套使用过渡
在做vue的demo的时候遇到一个问题,多个嵌套的元素如何设置transition? 我的代码:代码中元素整体做平移,里面的inner中做旋转,实现一个圆形滚动的效果 <transition n ...
- jQuery鼠标滑动切换焦点图
在线演示 本地下载
- SpringBoot 定义通过字段验证
第一步:定义ValidationResult类 public class ValidationResult { // 校验结果是否有错 private boolean hasErrors = fals ...
- centos、linux关机与重启命令详解
Linux centos关机与重启命令详解与实战 Linux centos重启命令: 1.reboot 2.shutdown -r now 立刻重启(root用户使用) 3.shutdown -r 1 ...
- elasticsearch 拼音搜索
现在很多公司都开始使用es来做搜索,我们公司目前也有好几个业务部门在用,我主要做商户搜索,为业务部门提供基础支持.上周把呼叫中心的搜索重新整理了下,在新增几个字段后,全量同步发现通过拼音首字母搜索无法 ...
- Node.Js安装教程
Node.Js安装教程 介绍下我的环境 环境 值 操作系统 win10 64bit Node.Js 8.9.4 emmmm 表格中毒了,为什么出不来效果 一.下载及安装 这个可以去Node.Js官网上 ...
- QT treewidget 右键菜单
VS2012+QT5.2 ,没有ui,纯代码实现右键 方法一:常规但略麻烦 1.头文件slot中声明 QTreeWidget *tree; void showrightMenu(QPoint);//显 ...
- AttributeError: module 'matplotlib' has no attribute 'verbose' (pycharm中使用matplotlib 2.2.0的坑)
AttributeError: module 'matplotlib' has no attribute 'verbose' 环境信息 本地系统:win10 本地开发环境:python(3.6.3), ...
- http客户端-基于boost开发
http客户端-基于boost开发 基于BOOST编写的http客户端,作为BOOST开发学习之用.目前支持功能: http协议,单向链接返回http response code 200 可conte ...