translate 动画不同时间飞入文字


代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select,figure,figcaption{margin:0;padding:0}
body{font:14px"微软雅黑","Arial Narrow",HELVETICA;}
figure{
float: left;
width: 33%;
overflow: hidden;
position: relative;
background: #2f0000;
}
figure img{
height: 400px;
/*width: 100%;*/
opacity: 0.9;
transition: all 0.35s;
}
figcaption{
position: absolute;
left: 0;
top: 0;
}
figcaption h3{
color: #ffffff;
}
figcaption p{
background:#ffffff;
color: #000000;
margin: 3px 3px 3px 3px;
font-size: 13px;
text-align: center;
width: 130px;
height: 20px;
line-height: 20px;
transition: all 0.35s;
transform: translate(-135px,0);
}
figcaption p:nth-of-type(1){
transition-delay: 0.05s;
}
figcaption p:nth-of-type(2){
transition-delay: 0.10s;
}
figcaption p:nth-of-type(3){
transition-delay: 0.15s;
}
figure:hover figcaption p{
transform: translate(0,0);
}
figure:hover img{
transform: translate(-50px,0);
opacity: 0.6;
}
@media screen and (max-width: 1000px){
figure{width: 50%}
}
@media screen and (max-width: 600px){
figure{width: 100%}
}
</style>
</head>
<body>
<figure>
<img src="image/002.jpg">
<figcaption>
<h3>标题标题</h3>
<p>文字文字文字文字</p>
<p>文字文字文字文字</p>
<p>文字文字文字文字</p>
</figcaption>
</figure>
<figure>
<img src="image/002.jpg">
<figcaption>
<h3>标题标题</h3>
<p>文字文字文字文字</p>
</figcaption>
</figure>
<figure>
<img src="image/003.jpg">
<figcaption>
<h3>标题标题</h3>
<p>文字文字文字文字</p>
</figcaption>
</figure>
</body>
</html>

转载于:https://www.cnblogs.com/yuanyuan-1994/p/8710678.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值