源码及素材下载地址 https://www.aliyundrive.com/s/tZFNjtN3zML 提取码: 7cx2 。

html代码

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>炫酷图片</title><link type="text/css" href="css/style.css" rel="stylesheet" />
</head>
<body background="img/heisetu.jpg">
<div class="box" ><ul class="minbox"><li></li><li></li><li></li><li></li><li></li><li></li></ul><ol class="maxbox"><li></li><li></li><li></li><li></li><li></li><li></li></ol>
</div>
</body>
</html>
css代码
@charset "utf-8";
*{margin:0;padding:0;
}
body{max-width: 100%;min-width: 100%;height: 100%;background-size: cover;background-repeat: no-repeat;background-attachment: fixed;background-size:100% 100%;position: absolute;margin-left: auto;margin-right: auto;
}
li{list-style: none;
}
.box{width:200px;height:200px;background-size: cover;background-repeat: no-repeat;background-attachment: fixed;background-size:100% 100%;position: absolute;margin-left: 42%;margin-top: 22%;-webkit-transform-style:preserve-3d;-webkit-transform:rotateX(13deg);-webkit-animation:move 5s linear infinite;
}
.minbox{width:100px;height:100px;position: absolute;left:50px;top:30px;-webkit-transform-style:preserve-3d;
}
.minbox li{width:100px;height:100px;position: absolute;left:0;top:0;
}
.minbox li:nth-child(1){background: url(../img/01.jpg) no-repeat 0 0;-webkit-transform:translateZ(50px);
}
.minbox li:nth-child(2){background: url(../img/02.jpg) no-repeat 0 0;-webkit-transform:rotateX(180deg) translateZ(50px);
}
.minbox li:nth-child(3){background: url(../img/03.jpg) no-repeat 0 0;-webkit-transform:rotateX(-90deg) translateZ(50px);
}
.minbox li:nth-child(4){background: url(../img/04.jpg) no-repeat 0 0;-webkit-transform:rotateX(90deg) translateZ(50px);
}
.minbox li:nth-child(5){background: url(../img/05.jpg) no-repeat 0 0;-webkit-transform:rotateY(-90deg) translateZ(50px);
}
.minbox li:nth-child(6){background: url(../img/06.jpg) no-repeat 0 0;-webkit-transform:rotateY(90deg) translateZ(50px);
}
.maxbox li:nth-child(1){background: url(../img/1.jpg) no-repeat 0 0;-webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(2){background: url(../img/2.jpg) no-repeat 0 0;-webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(3){background: url(../img/3.jpg) no-repeat 0 0;-webkit-transform:rotateX(-90deg) translateZ(50px);
}
.maxbox li:nth-child(4){background: url(../img/4.jpg) no-repeat 0 0;-webkit-transform:rotateX(90deg) translateZ(50px);
}
.maxbox li:nth-child(5){background: url(../img/5.jpg) no-repeat 0 0;-webkit-transform:rotateY(-90deg) translateZ(50px);
}
.maxbox li:nth-child(6){background: url(../img/6.jpg) no-repeat 0 0;-webkit-transform:rotateY(90deg) translateZ(50px);
}
.maxbox{width: 800px;height: 400px;position: absolute;left: 0;top: -20px;-webkit-transform-style: preserve-3d;}
.maxbox li{width: 200px;height: 200px;background: #fff;border:1px solid #ccc;position: absolute;left: 0;top: 0;opacity: 0.2;-webkit-transition:all 1s ease;
}
.maxbox li:nth-child(1){-webkit-transform:translateZ(100px);
}
.maxbox li:nth-child(2){-webkit-transform:rotateX(180deg) translateZ(100px);
}
.maxbox li:nth-child(3){-webkit-transform:rotateX(-90deg) translateZ(100px);
}
.maxbox li:nth-child(4){-webkit-transform:rotateX(90deg) translateZ(100px);
}
.maxbox li:nth-child(5){-webkit-transform:rotateY(-90deg) translateZ(100px);
}
.maxbox li:nth-child(6){-webkit-transform:rotateY(90deg) translateZ(100px);
}
.box:hover ol li:nth-child(1){-webkit-transform:translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(2){-webkit-transform:rotateX(180deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(3){-webkit-transform:rotateX(-90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(4){-webkit-transform:rotateX(90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(5){-webkit-transform:rotateY(-90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(6){-webkit-transform:rotateY(90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
@keyframes move{0%{-webkit-transform: rotateX(13deg) rotateY(0deg);}100%{-webkit-transform:rotateX(13deg) rotateY(360deg);}
}

文件放置路径如下:css文件放在css文件中。图片放在img中。需要根据图片大小修改源码或修改图片大小,内层用100*100,外侧用400*400,效果最佳

html实现立体图片代码相关推荐

  1. 3d相册 html 代码_HTML5 3D立体图片相册

    插件简介 HTML5非常强大,尤其是和CSS3结合,有时候能达到非同凡响的网页动画效果.今天要分享的这款HTML5应用就是一款很酷的3D立体图片相册应用,它可以用鼠标拖拽从多个角度浏览相册图片,点击图 ...

  2. php立方体相册源码,纯CSS实现3D的代码(正方体、动态立体图片册、平面的星空)...

    本篇文章所说的内容是纯CSS实现3D的代码(正方体.动态立体图片册.平面的星空),代码都非常详细,有需要的朋友可以看一下. 一.正方体 我认为正方体可以算是3D图像的基础吧,首先正方体是由六个相同的面 ...

  3. UI交互设计:红绿立体图片的制作

    UI交互设计:红绿立体图片的制作 文章目录 UI交互设计:红绿立体图片的制作 实验原理 python之openCV 实验流程 一.怎么拥有python(老鸟请跳过) 二.怎么安装openCV 三.写点 ...

  4. html图片消失代码,HTML图片代码

    HTML图片代码 2018-09-10 一.基础代码 二.加边框 1.普通黑色边框(浏览器默认黑色) 2.简单的CSS装饰框 ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ 三.加CSS滤镜 1.无参数滤镜 ①黑白 ...

  5. 分享117个JS图片代码,总有一款适合您

    分享117个JS图片代码,总有一款适合您 117个JS图片代码下载链接:https://pan.baidu.com/s/1iIFGOhPNjUIaStGeVpY1IA?pwd=qwfw  提取码:qw ...

  6. html背景图片随鼠标滚动条,博客音效代码、滚动条代码、单张图片滚动代码、背景图片代码、个性鼠标(2)...

    [99补]隐形博客音效代码 一句代码直接插入,比你从任何地方看到的都要简单: dynsrc=http://www.smartclub.com.cn/smart_sms/music/male/hktk. ...

  7. 分享118个JS图片代码,总有一款适合您

    分享118个JS图片代码,总有一款适合您 118个JS图片代码下载链接:https://pan.baidu.com/s/1Tr5jX-Lr8Ytzx1lV4zr8nA?pwd=ji78  提取码:ji ...

  8. 分享126个JS图片代码,总有一款适合您

    分享126个JS图片代码,总有一款适合您 126个JS图片代码下载链接:https://pan.baidu.com/s/1tLDf9ukWCBOQU-Z2o7ofLA?pwd=3of5  提取码:3o ...

  9. 三维立体图_原来三维立体图片是这样制作的,学会以后自己也可以设计

    最近很多朋友私信问我,三维立体图片是怎么制作的呢?我今天就教教大家三维立体图的设计方法,以后大家也就可以自己设计了. 准备工具 第一:3dmax设计软件和ps软件 第二:三维立体图合成器 首先这是设计 ...

最新文章

  1. 经典推荐:《Silverlight揭秘》和《ASP.NET 3.5高级程序设计(第2版)》
  2. javaweb乱码以及ajax乱码
  3. shell的输入和输出
  4. 缓存系列之一:buffer、cache与浏览器缓存
  5. Yii 2 美化 url
  6. java把date改成时间戳_spring处理数据库中Date类型字段转换成时间戳问题
  7. 【封装那些事】 泄露的封装
  8. 若依实现文件多线程批量上传案例
  9. 恢复云数据库MySQL的备份文件到自建数据库
  10. 机器学习算法与Python学习
  11. WPF基础到企业应用系列7——深入剖析依赖属性(WPF/Silverlight核心)
  12. mysql碎片data free_浅析MySQL数据碎片的产生(data free)
  13. 脑语言v0.5.8 2500令【单字编程】
  14. AxureShare太慢?尝试在内网架设Axure共享吧!
  15. 全国各地网站备案的通过时间表
  16. 怎样把word文档生成二维码?word如何制作二维码?
  17. Ubuntu18.04 wifi已连接却没办法上网~代理服务器出现问题
  18. 3d touch android,苹果3DTouch好用?安卓这个功能不比它差!
  19. Region Proposal by Guided Anchoring阅读笔记
  20. uniapp打包app 踩坑记录

热门文章

  1. Unity Shader 实现卡通渲染效果
  2. 怎样让自己的程序进程不让别人强行关闭掉
  3. 知识焦虑不可怕,可怕的是在焦虑中迷失方向
  4. CachingOperationNameGenerator : Generating unique operation named
  5. 二维码生成库zxing 空白边距问题
  6. nacos的服务注册以及健康检测机制
  7. PCB标记的埋雷设计,短路了却找不到一丝踪迹
  8. 华为3C刷机ROOT 一键ROOT必备工具
  9. linux触摸板设置密码程序6,Touchégg: Linux 上触摸板/屏的多指手势
  10. PowerPoint VBA批量格式转换:pptx转pdf、ppt以及反向转换