Css3位移动画效果
transform:translate();平移,传进 x,y值,代表沿x轴和y轴平移的距离
transition-delay: 指定对象过渡的延迟时间
代码
<!doctype
html>
<html>
<head>
<meta
charset="utf-8">
<title>无标题文档</title>
<style>
.kl{
width: 340px;
height: 650px;
}
.kl a{
display: block;
width: 340px;
height:150px;
background: white;
margin-bottom: 2px;
transform:translateX(-340px);
transition: all 0.4s ease;
background:rgba(6,110,168,1.00);
}
.kl:hover a{
transform:translateX(0px);
}
.kl
a:nth-last-of-type(1){
transition-delay: 0.4s;
}
.kl
a:nth-last-of-type(2){
transition-delay: 0.3s;
}
.kl
a:nth-last-of-type(3){
transition-delay: 0.2s;
}
.kl
a:nth-last-of-type(4){
transition-delay: 0.1s;
}
.kl a img{
width: 340px;
height:150px;
}
</style>
</head>
<body>
<div class="kl">
<a href=""></a>
<a href=""></a>
<a href=""></a>
<a href=""></a>
</div>
</body>
</html>
鼠标没移入之前效果
鼠标移入的效果