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

@keyframes mover {

40% {

opacity:1;

color:#ff0097

}

60% {

color:#00fd8a

}

}@-moz-keyframes mover {

40% {

opacity:1;

color:#ff0097

}

60% {

color:#00fd8a

}

80% {

opacity:.8

}

100% {

opacity:1

}

}@-webkit-keyframes mover {

40% {

opacity:1;

color:#ff0097

}

60% {

color:#00fd8a

}

80% {

opacity:.8

}

100% {

opacity:1

}

}@-o-keyframes mover {

40% {

opacity:1;

color:#ff0097

}

60% {

color:#00fd8a

}

80% {

opacity:.8

}

100% {

opacity:1

}

}@keyframes mover2 {

40% {

opacity:1;

color:#ff0016

}

60% {

color:#0034fd

}

}@-moz-keyframes mover2 {

40% {

opacity:1;

color:#ff0016

}

60% {

color:#0034fd

}

80% {

opacity:.8

}

100% {

opacity:1

}

}@-webkit-keyframes mover2 {

40% {

opacity:1;

color:#ff0016

}

60% {

color:#0034fd

}

80% {

opacity:.8

}

100% {

opacity:1

}

}@-o-keyframes mover2 {

40% {

opacity:1;

color:#ff0016

}

60% {

color:#0034fd

}

80% {

opacity:.8

}

100% {

opacity:1

}

}.box,.box2 {

margin:50px auto;

width:80%;

border-radius:8px;

line-height:180px;

border:1px solid #dedede;

letter-spacing:2px;

font-size:48px;

text-align:center;

color:#333;

text-transform:uppercase;

}

.box,.box2 i:nth-of-type(2) {

animation-delay:.05s

}

.box,.box2 i:nth-of-type(3) {

animation-delay:.1s

}

.box,.box2 i:nth-of-type(4) {

animation-delay:.15s

}

.box,.box2 i:nth-of-type(5) {

animation-delay:.2s

}

.box,.box2 i:nth-of-type(6) {

animation-delay:.25s

}

.box,.box2 i:nth-of-type(7) {

animation-delay:.3s

}

.box,.box2 i:nth-of-type(8) {

animation-delay:.35s

}

.box,.box2 i:nth-of-type(9) {

animation-delay:.4s

}

.box,.box2 i:nth-of-type(10) {

animation-delay:.45s

}

.box,.box2 i:nth-of-type(11) {

animation-delay:.5s

}

.box,.box2 i:nth-of-type(12) {

animation-delay:.55s

}

.box i,.box2 i {

text-shadow:0 0 8px gray;

font-weight:bold;

font-style:normal;

animation:mover 4s ease-in-out infinite;

-moz-animation:mover 4s forwards;

animation:mover 4s ease-in-out infinite;

-webkit-animation:mover 4s ease-in-out infinite;

-o-animation:mover 4s ease-in-out infinite

}

.box,.box2 i {

animation:mover2 .8s ease-in-out infinite;

-moz-animation:mover2 .8s forwards;

animation:mover2 .8s ease-in-out infinite;

-webkit-animation:mover2 .8s ease-in-out infinite;

-o-animation:mover2 .8s ease-in-out infinite

}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值