制作3D图片立方体旋转特效
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CSS3制作3D图片立方体旋转特效 - 站长素材</title>
<style type="text/css"> html{
background:linear-gradient(#ff0 0%,#F00 80%);
height: 100%;
} .wrap{
width: 650px;
height: 200px;
margin: 150px 360px;
position: relative; }
.cube{
width: 200px;
height: 200px;
margin: 0 auto;
transform-style: preserve-3d;
transform: rotateX(-30deg) rotateY(-80deg);
-webkit-animation: rotate 20s infinite;
animation-timing-function: linear;
}
@-webkit-keyframes rotate{
from{transform: rotateX(0deg) rotateY(0deg);}
to{transform: rotateX(360deg) rotateY(360deg);}
}
.cube div{
position: absolute;
width: 200px;
height: 200px;
opacity: 0.8;
transition: all .4s;
}
.pic{
width: 200px;
height: 200px;
}
.cube .out_front{
transform: rotateY(0deg) translateZ(100px);
}
.cube .out_back{
transform: translateZ(-100px) rotateY(180deg);
}
.cube .out_left{
transform: rotateY(90deg) translateZ(100px);
}
.cube .out_right{
transform: rotateY(-90deg) translateZ(100px);
}
.cube .out_top{
transform: rotateX(90deg) translateZ(100px);
}
.cube .out_bottom{
transform: rotateX(-90deg) translateZ(100px);
}
.cube span{
display: bloack;
width: 100px;
height: 100px;
position: absolute;
top: 50px;
left: 50px;
}
.cube .in_pic{
width: 100px;
height: 100px;
}
.cube .in_front{
transform: rotateY(0deg) translateZ(50px);
}
.cube .in_back{
transform: translateZ(-50px) rotateY(180deg);
}
.cube .in_left{
transform: rotateY(90deg) translateZ(50px);
}
.cube .in_right{
transform: rotateY(-90deg) translateZ(50px);
}
.cube .in_top{
transform: rotateX(90deg) translateZ(50px);
}
.cube .in_bottom{
transform: rotateX(-90deg) translateZ(50px);
}
.cube:hover .out_front{
transform: rotateY(0deg) translateZ(200px);
}
.cube:hover .out_back{
transform: translateZ(-200px) rotateY(180deg);
}
.cube:hover .out_left{
transform: rotateY(90deg) translateZ(200px);
}
.cube:hover .out_right{
transform: rotateY(-90deg) translateZ(200px);
}
.cube:hover .out_top{
transform: rotateX(90deg) translateZ(200px);
}
.cube:hover .out_bottom{
transform: rotateX(-90deg) translateZ(200px);
}
</style>
</head>
<body>
<!--/*外层最大容器*/-->
<div class="wrap">
<!-- /*包裹所有元素的容器*/-->
<div class="cube">
<!--前面图片 -->
<div class="out_front">
<img src="../aimg/食材1.jpg" class="pic">
</div>
<!--后面图片 -->
<div class="out_back">
<img src="../aimg/食材2.jpg" class="pic">
</div>
<!--左图片 -->
<div class="out_left">
<img src="../aimg/食材3.jpg" class="pic">
</div>
<div class="out_right">
<img src="../aimg/食材4.jpg" class="pic">
</div>
<div class="out_top">
<img src="../aimg/食材5.jpg" class="pic">
</div>
<div class="out_bottom">
<img src="../aimg/食材6.jpg" class="pic">
</div>
<!--小正方体 -->
<span class="in_front">
<img src="../aimg/食材7.jpg" class="in_pic" />
</span>
<span class="in_back">
<img src="../aimg/食材8.jpg" class="in_pic" />
</span>
<span class="in_left">
<img src="../aimg/食材9.jpg" class="in_pic" />
</span>
<span class="in_right">
<img src="../aimg/食材10.jpg" class="in_pic" />
</span>
<span class="in_top">
<img src="../aimg/食材11.jpg" class="in_pic" />
</span>
<span class="in_bottom">
<img src="../aimg/食材12.jpg" class="in_pic" />
</span>
</div>
</div>
</body>
</html>
制作3D图片立方体旋转特效的更多相关文章
- 网页特效:用CSS3制作3D图片立方体旋转特效
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...
- CSS3 3D图片立方体旋转
html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <titl ...
- 纯css3 3D图片立方体旋转动画特效
纯css3 3D立方体模块,鼠标触碰,模块炸开,大立方体中套小立方体 效果展示 手机扫描二维码体验效果: 效果图如下: 源码下载:http://hovertree.com/h/bjaf/0qmul8g ...
- 基于css3的3D立方体旋转特效
今天给大家分享一款基于css3的3D立方体旋转特效.这款特效适用浏览器:360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之窗. 不支持IE8及以下浏览器.效果图如下 : ...
- 用css实现3D立方体旋转特效
先来看运行后出来的效果 它是在不停运行的一个立方体 先来看html部分的代码 <div class="rect-wrap"> <!--舞台元素,设置perspec ...
- css实现3D立方体旋转特效
先来看运行后出来的效果 它是在不停运行的一个立方体 先来看html部分的代码 <div class="rect-wrap"> <!--舞台元素,设置perspec ...
- 纯CSS3超酷3D旋转立方体动画特效
简要教程 这是一款神奇的纯 CSS3 立方体动画特效插件.使用CSS3来制作动画效果已经成为WEB前端开发的一种时尚,从简单的颜色和尺寸动画,到复杂的旋转.翻转动画, CSS3 展现了它无穷的魅力.使 ...
- CSS3特效----制作3D旋转导航
大致思路:首先给 three-d-box 设置一个 transition是不可少的 然后每个 a 标签里面有两个 span 一个叫 font 一个叫 back,默认状态下 font 旋转0度,也就是没 ...
- jQuery可拖拽3D万花筒旋转特效
这是一个使用了CSS3立体效果的强大特效,本特效使用jQuery跟CSS3 transform来实现在用户鼠标按下拖动时,环形图片墙可以跟随鼠标进行3D旋转动画. 效果体验:http://hovert ...
随机推荐
- MS SQL SERVER 2000 常用 Tran-SQL 语句
一.创建数据库:create database mydb-创建数据库mydbon primary-在primary文件组中( name = mydb_data1,filename = 'd:\sql ...
- Accumulators
copy的官方programming guide的代码,只有一个要说一下,Accumulators的更新是在action做的,transformation操作中对于Accumulators的增加不会即 ...
- 关于LR中的EXTRARES
LoadRunner脚本之EXTRARES参数 EXTRARES:分隔符,表示标记下一个属性是资源属性的列表(list of resource attributes). [EXTRARES后的资源是由 ...
- MAXIMO系统 java webservice 中PDA移动应用系统开发
MAXIMO系统 java webservice 中PDA移动应用系统开发 平时经常用的wince PDA手持设备调用c#写的webservice, 当然PDA也可以调用java webservic ...
- EF 实体映射
1.继承自EntityTypeConfiguration 2.ToTable映射表名 3.HasKey映射主键,Property配置属性,并返回PrimitivePropertyConfigurati ...
- HDU 2222(AC自动机模板题)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2222 题目大意:多个模式串.问匹配串中含有多少个模式串.注意模式串有重复,所以要累计重复结果. 解题 ...
- pygame系列_百度随心听_完美的UI设计
这个程序的灵感来自于百度随心听 下面是我的程序截图: 说明: 动作按钮全部是画出来的,没有用到任何图片 用到图片的只有:背景,歌手图片,作者图片 代码正在调试中.... 如果你鼠标移动到黄色小圆里面, ...
- ITK 3.20.1 VS2010 Configuration 配置
Download ITK 3.20.1 Download VS2010 Download CMake 3.2.0 I assume you've already installed VS2010 an ...
- FreeBSD Intel SYSRET Kernel Privilege Escalation Exploit
/* * FreeBSD 9.0 Intel SYSRET Kernel Privilege Escalation exploit * Author by CurcolHekerLink * * Th ...
- PHP统计字符串里单词查询关键字
<?function full_count_words($str) { //返回完整数组,包含字符串里每个单词 $words = str_word_count($str,1); ...