html左侧黑色梯形状线条,html – 使用纯css左,下,左边的线条绘制动画

本文介绍了一种使用CSS动画实现动态加载效果的方法。通过两个关键帧和after伪元素,可以创建从左到右和从上到下的动态加载动画。这种方法不需要额外的JavaScript代码,仅用CSS就能完成。

您可以根据我的代码段实现此效果.

我使用了两个关键帧和一个after属性来添加底线

.transitionLine {

height: 0px;

width: 1px;

border-top: 10px solid #ef4e4e;

border-right: 10px solid #ef4e4e;

position: relative;

-webkit-animation: increase 3s;

-moz-animation: increase 3s;

-o-animation: increase 3s;

animation: increase 3s;

animation-fill-mode: forwards;

}

.transitionLine:after {

content: '';

display: block;

height: 0px;

width: 1px;

border-top: 10px solid #ef4e4e;

border-right: 10px solid #ef4e4e;

-webkit-animation: increase2 3s;

-moz-animation: increase2 3s;

-o-animation: increase2 3s;

animation: increase2 3s;

animation-fill-mode: forwards;

position: absolute;

left: 100%;

bottom: 0;

}

@keyframes increase {

/*load to left*/

30% {

width: 200px;

height: 0px;

}

31% {

width: 200px;

height: 1px;

}

/*load down*/

60% {

height: 100px;

width: 200px;

}

/*load to left*/

100% {

height: 100px;

width: 200px;

}

}

@keyframes increase2 {

60% {

height: 0px;

width: 0px;

}

/*load to left*/

100% {

height: 0px;

width: 200px;

}

}

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值