用HTML搭建3D立体相册网页,可放大缩小
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><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{/*background: url(../img/preview.png) ;*/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(../imga/01.jpg) no-repeat 0 0;-webkit-transform:translateZ(50px);
}
.minbox li:nth-child(2){background: url(../imga/02.jpg) no-repeat 0 0;-webkit-transform:rotateX(180deg) translateZ(50px);
}
.minbox li:nth-child(3){background: url(../imga/03.jpg) no-repeat 0 0;-webkit-transform:rotateX(-90deg) translateZ(50px);
}
.minbox li:nth-child(4){background: url(../imga/04.jpg) no-repeat 0 0;-webkit-transform:rotateX(90deg) translateZ(50px);
}
.minbox li:nth-child(5){background: url(../imga/05.jpg) no-repeat 0 0;-webkit-transform:rotateY(-90deg) translateZ(50px);
}
.minbox li:nth-child(6){background: url(../imga/06.jpg) no-repeat 0 0;-webkit-transform:rotateY(90deg) translateZ(50px);
}
.maxbox li:nth-child(1){background: url(../imga/1.jpg) no-repeat 0 0;-webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(2){background: url(../imga/2.jpg) no-repeat 0 0;-webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(3){background: url(../imga/3.jpg) no-repeat 0 0;-webkit-transform:rotateX(-90deg) translateZ(50px);
}
.maxbox li:nth-child(4){background: url(../imga/4.jpg) no-repeat 0 0;-webkit-transform:rotateX(90deg) translateZ(50px);
}
.maxbox li:nth-child(5){background: url(../imga/5.jpg) no-repeat 0 0;-webkit-transform:rotateY(-90deg) translateZ(50px);
}
.maxbox li:nth-child(6){background: url(../imga/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: 600px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(2){-webkit-transform:rotateX(180deg) translateZ(300px);width: 600px;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: 600px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(6){-webkit-transform:rotateY(90deg) translateZ(300px);width: 600px;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);}
}
图片的话,根据自己喜好放自己喜欢的图片即可。
用HTML搭建3D立体相册网页,可放大缩小相关推荐
- 还在买鲜花送女神?手把手教你搭建3D立体相册网站,包女神稀饭
是不是一款人见人爱的相册网站,看下图演示马上知晓.360度3D立体旋转,随意放大缩小任一张照片,合适每一个女生的小胃口,保证女神眼前一亮,对您刮目相看. 我们的特点是--情人节圣诞节女神生日纪念日都适 ...
- 搭载3D立体相册网页 加入背景音乐 真香!
一.3D立体相册 HTML代码 <!DOCTYPE html> <html lang="en"><head><meta
- 抖音程序员HTML相册,快手抖音程序员表白女朋友3D立体相册源码html网页相册代码...
前几天分享了一套源码,今天又为大家带来一套类似的源码,希望大家喜欢! 快手抖音很火的程序员女朋友3D立体相册源码html网页相册代码,经测试在IE8浏览器下无法预览,建议使用支持HTML5与css3效 ...
- css3 3D立体相册实现
这几天无聊,看到有博主弄的电子相册有点意思,就照葫芦画瓢也实现了一个,一个半透明的正方体包含着一个小正方体,相册自动旋转,当获得焦点时变化效果,截图如下: 一,代码目录结构 二,html代码 < ...
- H5 3d立体相册 CSS3特性
CSS3 变形特性,立方相册,3d旋转 之前看见过3d效果的立体相册,挺羡慕的,现在自己也有机会实现属于自己的3d立体相册了~~~话不多说,开搞- 一, 准备材料 六张自己喜欢的图片,六个面,怎么简单 ...
- 抖音3d相册html代码,抖音3D立体相册表白代码.doc
抖音3D立体相册表白浪漫代码 首先先建立html文件 css-3d旋转 之后再新建一个CSS的文件夹 并在css文件夹中建立txt文件,并且把代码复制进去,修改后缀名为.css html{ backg ...
- 3D立体相册不过是冷锋蓝plus版 html+css
一.话不多,先看效果: 转念一想,好像很久很久没出css特效的文章了,特别是工作之后,更少了.偶然翻看电脑内存的时候,发现这个自己1年多以前写的特效,甚美,又勾起我一段尘封的回忆...我原来也发过3D ...
- 3D立体相册模板(大小可更改)
这一次代码里面加入了注释,标注了如果要更改大小需要更改的数据,以便大家更好地使用~ <!Doctype html> <html lang="en">< ...
- 创意相册、3D立体相册
3D表白相册 精美的3D动态相册,快去做给她吧! 点我下载 换的图片格式要一样,实在不一样就去代码里面改后缀名 https://download.csdn.net/download/weixin_43 ...
最新文章
- linux的周期计划任务叫atd,linux计划任务
- linux查找特定类型的文件中是否包含特定字段
- Android 手把手带你玩转自己定义相机
- python编程书籍资料整理大全
- 【kafka】支持超高并发的kafka网络设计
- Java中的枚举(Enumeration)
- 我的手机,被“探针”了吗?
- java经典源码 阅读_公开!阿里甩出“源码阅读指南”,原来源码才是最经典的学习范例...
- 【美团外卖】美食知识图谱的迭代及应用
- STL标准模版库---stack操作大全
- smack4中文文档
- Atitit 深入理解耦合Coupling的原理与attilax总结 目录 1.1. 耦合作为名词在通信工程、软件工程、机械工程等工程中都有相关名词术语。	2 1.2. 所有的耦合形式可分为5类:
- Atitit 关于建立知识库体系的方案
- CAB无法连接到远程计算机,当您使用远程桌面连接 (RDC) 7.0 连接不正确地更新远程应用程序应用程序中的组合框项...
- 2019建模美赛B题(派送无人机)M奖论文
- win10系统镜像下载及在VMware虚拟机上创建虚拟机
- 阿里出品的最新版 Java 开发手册,嵩山版,扫地僧
- Markdown 语法手册 (完整整理版)转抄
- 呆萌却实际可怕的动物:蛇鹫会踢腿 大熊猫攻击凶猛
- 森林救火与计算机相关,无人机森林防火解决方案包含了哪些技术?
热门文章
- [4G5G专题-93]:流程 - 4G LTE 终端在RRC 连接状态下的小区切换通用过程
- 类与对象(一)----什么是类和对象
- Linux文件类型与属性
- gpu服务器厂家_嵌入式主板厂家告诉你选择GPU服务器的5大标准
- JS方法/函数重载的姿势
- java一元多项式减法运算_一元多项式的表示及加减乘除运算
- c语言几张图片合成视频,一张有料的图片!!!附文件-图片合成器C语言实现算法-站长资讯中心...
- Android自定义广播和监听
- Android打开手机的手电筒
- loopback address 回送地址