html骨架代码

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<title></title>
<link rel="stylesheet" href="css/css3.css"/>
</head>
<body>
<figure class="one">
<img src="img/img01.jpg" />
<figcaption>
<h2>移动效果标题</h2>
<p>移动效果一</p>
<p>移动效果二</p>
<p>移动效果三</p>
</figcaption>
</figure>
<figure class="two">
<img src="img/img02.jpg"/>
<figcaption>
<h2>旋转效果标题</h2>
<p>旋转效果</p>
<div></div>
</figcaption>
</figure>
<figure class="three">
<img src="img/img03.jpg"/>
<figcaption>
<h2>斜切效果标题</h2>
<p>斜切效果</p>
</figcaption>
</figure>
<figure class="four">
<img src="img/img04.jpg"/>
<figcaption>
<h2>缩放效果标题</h2>
<p>缩放效果</p>
<div></div>
</figcaption>
</figure>
<figure class="five">
<img src="img/img05.jpg"/>
<figcaption>
<h2>缩放效果标题</h2>
<p>缩放效果</p>
<div><input type="button" value="button1"/></div>
</figcaption>
</figure>
<figure class="six">
<img src="img/img07.jpg"/>
<figcaption>
<h2>缩放效果标题</h2>
<p>缩放效果</p>
<div class="border1"></div>
<div class="border2"></div>
</figcaption>
</figure>
</body>
</html>

css

body,figure,figcaption,img,h2,p{padding: 0; margin: 0;}
body{width: 100%;}
figure{position:relative; float: left; overflow: hidden; height: 350px; width: 33.33%; }
figcaption{position: absolute; top: 0; left:0;color: #fff; font-family: "寰蒋闆呴粦"; }
figure img{opacity: 0.8;}
figure figcaption,figure figcaption p,figure img{transition:all 0.35s;}
figure figcaption,figure figcaption div{transition:all 0.35s;}
figure figcaption p,figure figcaption h2{transition:all 0.35s;}
figure:hover img{transform:translate(-150px,0); opacity: 0.5}
@media screen and ( max-width: 600px) {
figure{width: 100%}
}
@media screen and (min-width: 601px) and ( max-width: 1000px) {
figure{width: 50%}
}
@media screen and (min-width: 1001px) {
figure{width: 33.33%}
}
.one{background: #f9aa0f;}
.one figcaption{padding: 20px;}
.one figcaption p{ text-align: center; background:#fff; color: #333; margin-top: 3px; transform:translate(-200px,0);}
.one:hover figcaption p{transform:translate(0,0);}
.one:hover figcaption p:nth-of-type(1){transition-delay:0.15s;}
.one:hover figcaption p:nth-of-type(2){transition-delay:0.3s;}
.one:hover figcaption p:nth-of-type(3){transition-delay:0.35s;} .two{background-color: #60299e;}
.two figcaption{width: 100%; height: 100%;}
.two figcaption div{width: 80%; height: 80%; border: 2px solid #fff; position: absolute; top:10%; left: 10% ; transform:translate(0,-350px) rotate(0deg) scale(0.5,0.5);}
.two figcaption h2{ margin-left: 15%; margin-top: 11%; }
.two figcaption p{margin-left: 15%; transform:translate(0,30px);opacity: 0;}
.two:hover figcaption div{transform:translate(0,0) rotate(360deg) scale(1,1);}
.two:hover figcaption p{opacity: 1; transform:translate(0,0)} .three figcaption{margin-top: 20%; margin-left: 40%; transform:skew(90deg,0) }
.three:hover figcaption{transform:skew(0,0)} .four{background-color: #89cf3f;}
.four figcaption{width: 100%; height: 100%;}
.four figcaption div{width: 100%; height: 100%; border: 2px solid #fff; position: absolute;top: 0;left: 0; opacity: 0;}
.four:hover figcaption div{transform:scale(0.8,0.8); opacity: 1;}
.four:hover img{transform:scale(1.2,1.2);}
.four figcaption h2{margin-left: 15%; margin-top: 15%; transform:scale(1.2,1.2)}
.four figcaption p{margin-left: 15%; transform:scale(1.2,1.2)}
.four:hover figcaption h2{transform:scale(1,1);}
.four:hover figcaption p{transform:scale(1,1);} .five{ background-color: #b5b5b5;}
.five figcaption{padding: 10% 25%; width: 100%; height: 100%; transform:translate(0,20px)}
.five figcaption div{width:100%; height: 100%; background-color:rgba(250,250,250,0.8); position: absolute; top:350px; left:0;}
.five figcaption div input{transform:rotate(15deg); margin-left:40%; margin-top: 5%; }
.five:hover figcaption div{ transform-origin:0 0; transform:rotate(-15deg);}
.five:hover figcaption{ transform:translate(0,0)} .six{background-color: #777569;}
.six figcaption{ width: 100%; height: 100%;}
.six figcaption h2{margin-left: 30%; margin-top: 10%;}
.six figcaption p{margin-left: 30%; }
.six figcaption div{position: absolute; border: 2px solid #fff; }
.six figcaption div.border1{width: 60%; height: 0%; top: 45%; left: 20%; border-top: none; border-bottom: none;}
.six figcaption div.border2{width: 0%; height: 60%; top: 20%; left: 50%; border-left: none; border-right: none;} .six:hover figcaption div.border1{ height: 80%; top:10%;}
.six:hover figcaption div.border2{ width: 80%; left:10%;}
.six:hover figcaption h2{margin-top: 20%;}

6种css3 transform图片悬停动态效果的更多相关文章

  1. iHover – 30+ 纯 CSS3 实现的超炫的图片悬停特效

    iHover 是一个令人印象深刻的图片悬停效果集合,完全基于 CSS3 实现,无依赖,能够搭配 Bootstrap 3 很好地工作.基于 SCSS 技术构建(包括文件),便于修改变量.有模块化的代码, ...

  2. 基于CSS3图片悬停放大特效

    今天我们要来分享一款很酷的CSS3图片特效,这款图片特效可以利用鼠标滑过图片使其悬停放大,并使图片的周围出现发光的效果.配合黑色的背景,这款CSS3图片悬停放大效果显得更加立体大气,非常适合产品图片的 ...

  3. iHover – 30+ 纯 CSS 实现的超炫的图片悬停特效

    iHover 是一个令人印象深刻的图片悬停效果集合,完全基于 CSS3 实现,无依赖,能够搭配 Bootstrap 3 很好地工作.基于 SCSS 技术构建,便于修改变量.有模块化的代码,无需包含整个 ...

  4. 【CSS3】 理解CSS3 transform中的Matrix(矩阵)

    理解CSS3 transform中的Matrix(矩阵) by zhangxinxu from http://www.zhangxinxu.com 本文地址:http://www.zhangxinxu ...

  5. CSS3 transform rotate(旋转)锯齿的解决办法

    -moz-transform: rotate(5deg);-webkit-transform: rotate(5deg); 把图片旋转了5度.本以为轻而易举,可遇到了问题.在Fireofx中显示正常, ...

  6. 理解CSS3 transform中的Matrix(矩阵)

    一.哥,我被你吓住了 打架的时候会被块头大的吓住,学习的时候会被奇怪名字吓住(如“拉普拉斯不等式”).这与情感化设计本质一致:界面设计好会让人觉得这个软件好用! 所以,当看到上面“Matrix(矩阵) ...

  7. div 中图片溢出问题及 CSS3中图片翻转问题

    如果设置一个div 装两张以上的图片,如果不设置好div的宽度和高度,就会使图片溢出. 我们知道,div是可以由图片撑开其宽高的,也就是说如果只放一张图片的情况下,不设置div的宽高,div的宽高会默 ...

  8. 理解CSS3 transform中的Matrix(矩阵)——张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=2427 一.哥,我被你 ...

  9. css3 transform中的matrix矩阵

    CSS3中的矩阵CSS3中的矩阵指的是一个方法,书写为matrix()和matrix3d(),前者是元素2D平面的移动变换(transform),后者则是3D变换.2D变换矩阵为3*3, 如上面矩阵示 ...

随机推荐

  1. 客户的一个紧急bug,我用了两种方式进行 C# 反编译修改源码

    一:背景 1. 讲故事 周五下午运营反馈了一个紧急bug,说客户那边一个信息列表打不开,急需解决,附带的日志文件也发过来了,看了下日志大概是这样的: 日期:2020-11-13 12:25:45,92 ...

  2. docker生产——容器通信

    简介 在接触docker的第一天起,大家应该就知道:docker容器使用沙箱机制,相互之间没有接口,一般情况下内部访问通过IP+端口.本地容器默认分配的IP极易发生变化,所以靠IP+端口访问的方式缺失 ...

  3. parted会启动你的ceph osd,意外不?

    前言 如果看到标题,你是不是第一眼觉得写错了,这个怎么可能,完全就是两个不相关的东西,最开始我也是这么想的,直到我发现真的是这样的时候,也是很意外,还是弄清楚下比较好,不然在某个操作下,也许就会出现意 ...

  4. 关于JPA一对一,一对多(多对一),多对多的详解

    一.@OneToOne关系映射 JPA使用@OneToOne来标注一对一的关系. 实体 People :用户. 实体 Address:家庭住址. People 和 Address 是一对一的关系. 这 ...

  5. WeihanLi.Npoi 1.13.0 更新日志

    WeihanLi.Npoi 1.13.0 更新日志 Intro 在 Github 上收到 Issue 收到网友反馈希望支持自动分 Sheet 导出,有兴趣的可以参考 Issue https://git ...

  6. Java编译程序和运行过程详解

    java整个编译以及运行的过程相当繁琐,我就举一个简单的例子说明: 编译原理简单过程:词法分析 --> 语法分析 --> 语义分析和中间代码生成 --> 优化 --> 目标代码 ...

  7. Route_of_Linux

    爬过六个陡坡,对Linux了如指掌 本文是极客时间App中刘超老师趣谈Linux操作系统的学习路径课程的学习笔记 抛弃旧思维习惯,熟练使用命令行 要从Windows的思维习惯,切换成Linux的命令行 ...

  8. FL Studio音乐编曲入门教程

    有很多小伙伴给我们留言说使用FL Studio20一段时间后,虽然对这款音乐编曲软件的功能有了一个了解,但对它整个的编曲过程还不是太熟悉.所以今天我就给大家带来了FL Studio20这款音乐编曲软件 ...

  9. PDF编辑:pdfFactory文本备注功能详解

    除了word的doc文件外,PDF也是我们经常接触到的文件格式,经常需要在pdf文件上进行编辑与修改,或者给内容做提示和备注. 文件的文本备注功能可以用pdfFactory来进行,编辑打印PDF一条龙 ...

  10. 换系统之后为什么iMindMap会提示“许可证使用的次数过多”

    iMindMap是一款十分受欢迎的思维导图软件,随着12版本的上线,iMindMap新增了很多新用户,最近小编发现有不少新用户在群里反映:"为什么购买iMindMap时说可以支持换机,但是在 ...