css 字体怎么动画,CSS文字动画

html {

height:100%;

}

body {

height:100%;

display:flex;

justify-content:center;

align-items:center;

background:rgb(196,14,14);

margin:0 auto;

}

main {

width:400px;

height:230px;

border:10px solid white;

position:relative;

cursor:pointer;

}

main div {

width:100%;

height:100%;

position:absolute;

font-size:100px;

text-align:center;

line-height:230px;

font-family:黑体;

font-weight:bold;

}

.first {

color:white;

}

.second {

width:0px;

position:absolute;

overflow:hidden;

background:white;

transition:4s;

animation:one 5s ease-in-out 1;

animation-fill-mode:both;

}

.seconds {

color:rgb(196,14,14);

width:400px;

}

@keyframes one {

0% {

width:0px;

}

25% {

width:50px;

}

50% {

width:150px;

}

100% {

width:400px;

}

}.three {

width:0px;

background:rgb(224,9,9);

overflow:hidden;

right:0;

animation:two 5s linear 1;

animation-fill-mode:both;

animation-delay:5s;

}

@keyframes two {

0% {

width:0px;

}

100% {

width:200px;

}

}.threes {

width:400px;

color:white;

position:absolute;

animation:twos 5s linear 1;

animation-fill-mode:both;

animation-delay:5s;

}

@keyframes twos {

0% {

left:-400px;

}

100% {

left:-200px;

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值