html代码

<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<title>3D相册</title> 
<link rel="stylesheet" type="text/css" href="3d相册.css">
</head> 
<div class="box"> 
<embed src="音乐地址" hidden="true" autostart="true" loop="true" hidden="true ">
<ul class="minbox"> 
<li><img src="图片地址01.jpg" width="100" height="100"></li> 
<li><img src="图片地址02.jpg" width="100" height="100"></li> 
<li><img src="图片/03.jpg" width="100" height="100"></li> 
<li><img src="图片地址04.jpg" width="100" height="100"></li> 
<li><img src="图片地址05.jpg" width="100" height="100"></li> 
<li><img src="图片地址06.jpg" width="100" height="100"></li> 
</ul> 
<ol class="maxbox"> 
<li><img src="图片地址/1.jpg" width="400" height="400"></li> 
<li><img src="图片地址/2.jpg" width="400" height="400"></li> 
<li><img src="图片地址3.jpg" width="400" height="400"></li> 
<li><img src="图片地址.jpg" width="400" height="400"></li> 
<li><img src="图片地址/5.jpg" width="400" height="400"></li> 
<li><img src="图片地址/6.jpg" width="400" height="400"></li> 
</ol> 
</div> 
</body> 
</html>

备注:,

  • 1,01为两张相同图片,但为不同格式,1为400px乘400px,01为100px乘100px。

    以此类推,

  • hidden="ture"为自动播放,属性值可改为fale,取消自动播放,loop=“正整数”设置播放次数

css代码:

*{
    margin:0;
    padding:0;
}
body{
    
    background-image: url(图片地址);
                background-size: cover;
    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.png) no-repeat 0 0;
    -webkit-transform:translateZ(50px);
}
.minbox li:nth-child(2){
    background: url(../img/02.png) no-repeat 0 0;
    -webkit-transform:rotateX(180deg) translateZ(50px);
}
.minbox li:nth-child(3){
    background: url(../img/03.png) no-repeat 0 0;
    -webkit-transform:rotateX(-90deg) translateZ(50px);
}
.minbox li:nth-child(4){
    background: url(../img/04.png) no-repeat 0 0;
    -webkit-transform:rotateX(90deg) translateZ(50px);
}
.minbox li:nth-child(5){
    background: url(../img/05.png) no-repeat 0 0;
    -webkit-transform:rotateY(-90deg) translateZ(50px);
}
.minbox li:nth-child(6){
    background: url(../img/06.png) no-repeat 0 0;
    -webkit-transform:rotateY(90deg) translateZ(50px);
}
.maxbox li:nth-child(1){
    background: url(../img/1.png) no-repeat 0 0;
    -webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(2){
    background: url(../img/2.png) no-repeat 0 0;
    -webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(3){
    background: url(../img/3.png) no-repeat 0 0;
    -webkit-transform:rotateX(-90deg) translateZ(50px);
}
.maxbox li:nth-child(4){
    background: url(../img/4.png) no-repeat 0 0;
    -webkit-transform:rotateX(90deg) translateZ(50px);
}
.maxbox li:nth-child(5){
    background: url(../img/5.png) no-repeat 0 0;
    -webkit-transform:rotateY(-90deg) translateZ(50px);
}
.maxbox li:nth-child(6){
    background: url(../img/6.png) 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);
    }
}

3D相册加背景图和背景音乐相关推荐

  1. eacharts和eacharts-gl、3d饼图、3d柱状图加折线图、下载gl报错解决

    eacharts-gl下载时版本一定要和eacharts版本对应.否则不出效果!!目前已知可以生效有: 第一种1: npm install echarts@5.1.2 --save npm insta ...

  2. php背景图添加字,怎样给视频后面加背景图 视频加背景图片并添加一行广告文字...

    有不少广告小视频中,视频画面是一张海报背景图片,图片上显示一个小视频播放,并且在画面上还有显示一行广告字幕.这样的宣传视频制作其实蛮简单的,怎样给视频后面加背景图片的方法倒是挺多,要给视频加背景图片的 ...

  3. VScode加背景图(工作区及全局)

    VScode 加背景图 1.下插件background(图像是动漫小女孩)(ctrl+ shift + x可快捷打开插件商店,以下出现的快捷方式皆会帮助我们快速找到位置) 2. ( ctrl+, ) ...

  4. swif开发iOS中如果要对某块内容加背景图并自适应填充图像

    swif开发iOS中如果要对某块内容加背景图并自适应填充图像 private func setupInfiniteScrollingView() { self.loadMoreView = UIVie ...

  5. windowbuilder怎么加背景图_小红书引流:爆款笔记封面图怎么做?(内附教程)...

    大家好,我是小柯老师. 今天,我想给大家带来分享的主题是<小红书引流:爆款笔记封面图怎么做?> 很多宝宝在接触小红书博主这个行业之前,在听到一个有一定粉丝基础的博主仅仅通过写一篇笔记就可以 ...

  6. windowbuilder怎么加背景图_抖音吸粉新套路,主页背景图太太太太有心机了

    抖音在今年1月初,宣布完成了日活破 2.5 亿,月活破 5 亿的小目标. 现在双微一抖早就成为新媒体运营的标配了,可以说抖音的发展是大势所趋,那么要怎么低成本且快速地在抖音获取用户呢? 在这里,分享一 ...

  7. JAVA实现二维码生成加背景图

    应用场景:比如制作海报.宣传图时需要添加扫码关注的二维码 先上效果图 ( ≧▽≦ ) POM.XML <!-- 二维码生成 --><!-- https://mvnrepository ...

  8. python天气查询小程序加背景图_微信小程序开发背景图显示功能

    这两天开发微信小程序,在设置背景图片时,发现在wxss里面设置background-image:(url) 属性,不管是开发工具还是线上都无法显示.经过查资料发现,background-image只能 ...

  9. 给html网页加背景图

    在css文档里直接改动body. body{    background-image: url(../images/bg.jpg); /*背景图片路径设置*/    background-repeat ...

最新文章

  1. Jetty开发指导:框架
  2. linux 修改时间的命令,Linux 常用命令(查看版本、修改系统时间)
  3. java 对象转json,java首字母小写,判断方法是否为javabean方法
  4. 【蓝桥杯】基础练习 特殊回文数
  5. 在面试中如何展示虚拟机和内存调优技能
  6. Web内容管理系统 Magnolia 启程-挖掘优良的架构(3)
  7. nginx源码学习资源
  8. MySQL的错误:No query specified
  9. Win7系统打开网页特别慢的解决方法
  10. 4.3.3 用jQuery获取动态数据
  11. 7大编程误区,你避开了吗?
  12. pythonxml库_Python XML操作
  13. 行业方案|“医疗”行业智能运维解决方案介绍
  14. 爬虫爬出来的数据不全_Web Scraper教程(二)爬虫入门之当当畅销书爬取
  15. 【笔记】html文件的图片上添加文字说明或者链接文字
  16. postgresql mysql 源码安装_PostGreSQL12 源码安装与字符集修改 (一)
  17. 前端js——倒计时效果实现 动态显示倒计时
  18. 计算机的本质到底是什么?
  19. 微信小程序横屏字体变大的完美解决方案
  20. 跳一跳python刷分_微信跳一跳python怎么刷分 python脚本刷分技巧

热门文章

  1. 《逆向管理-先行动后思考》
  2. 2018 Multi-University Training Contest 8
  3. 离散数学-图论-欧拉图与哈密顿图整理
  4. 【学术相关】基金申请全盘攻略,看过的人都能中!
  5. C语言for循环使用方法
  6. 关于vagrant VirtualBox中安装laravel项目
  7. ONNX构建并运行模型
  8. 金,银,铜,铝nbsp;的导电性能
  9. windows7系统安装(day07)
  10. 学习软件测试前景如何?好就业吗?