transform:translate();平移,传进 x,y值,代表沿x轴和y轴平移的距离
transition-delay: 指定对象过渡的延迟时间
代码
<!doctypehtml><html><head><metacharset="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);}.kla:nth-last-of-type(1){transition-delay: 0.4s;}.kla:nth-last-of-type(2){transition-delay: 0.3s;}.kla:nth-last-of-type(3){transition-delay: 0.2s;}.kla: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>
鼠标没移入之前效果
鼠标移入的效果