为了账号安全,请及时绑定邮箱和手机立即绑定

css 实现图片文字动画效果————文字版整理(1)

.test1 figcaption p {
background: #fff;
color: #333;
margin: 3px;
text-align: center;
transform: translate(-400px, 0px);
/将文字的位置向左平移400px,将其被overflow:hidden;隐藏。/

figure figcaption p {
transition: all 0.35s;
}

figure figcaption p:nth-of-type(1) {
/nth-of-type(1)是一个伪类 定义同级的兄弟元素第一个意义一个属性/
transition-delay: 0.05s;
}

figure figcaption p:nth-of-type(2) {
/nth-of-type(1)是一个伪类 定义同级的兄弟元素第二个意义一个属性/
transition-delay: 0.1s;
}

figure figcaption p:nth-of-type(3) {
/nth-of-type(1)是一个伪类 定义同级的兄弟元素第三个意义一个属性/
transition-delay: 0.15s;
}
figure figcaption p,h2,span{ transition: all 0.35s}
/ 给这些标签的添加动画效果/
.test1:hover img{
transform: translate(-50px,0px); opacity: 0.5;
}
/添加伪类hover 当鼠标移动到图片上时开始移动图片向左移动50px /

点击查看更多内容
1人点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消