css html文字淡入淡出,CSS3 文本特效 - 瓦片化淡入淡出

CSS

语言:

CSSSCSS

确定

body {

background: #ecf0f1;

overflow: hidden;

}

body * {

position: absolute;

}

.container {

font-size: 1.5vw;

top: 50%;

left: 50%;

}

.char {

width: 5em;

height: 5em;

top: -2.5em;

background: radial-gradient(#2b87c3, #34495e);

}

.char .tile {

width: 1em;

height: 1em;

}

.char .tile:before {

content: '';

display: block;

position: absolute;

top: 0;

left: 0;

width: 100%;

/* Border: fix the currentColor bug in chrome and cover the gaps due to pixel rouding */

height: 100%;

border: 1px solid;

margin: -1px 0 0 -1px;

background: currentColor;

}

@keyframes char1 {

0%,100% {

left: -8em;

}

}

.char:nth-child(1) {

animation: char1 18s steps(1) infinite;

}

@keyframes rottile1_1_1 {

from, to, 0%, 19.44444%, 27.77778%, 47.22222%, 55.55556%, 91.66667% {

transform: rotate3d(1, -1, 0, 0deg);

color: #ecf0f1;

}

4.16667%,

15.27778%,

59.72222%,

87.5% {

transform: rotate3d(1, -1, 0, 90deg);

color: #bdc3c7;

}

}

.char:nth-child(1) .tile:nth-child(1) {

top: 0;

left: 0;

transform: translate(0em, 0em);

}

.char:nth-child(1) .tile:nth-child(1):before {

animation: rottile1_1_1 18s infinite;

animation-play-state: running !important;

}

@keyframes rottile1_1_2 {

from, to, 0.46296%, 19.90741%, 27.95139%, 47.39583%, 55.77485%, 91.88596% {

transform: rotate3d(1, -1, 0, 0deg);

color: #ecf0f1;

}

4.62963%,

15.74074%,

32.11806%,

43.22917%,

59.94152%,

87.7193% {

transform: rotate3d(1, -1, 0, 90deg);

color: #bdc3c7;

}

}

.char:nth-child(1) .tile:nth-child(2) {

top: 0;

left: 0;

transform: translate(1em, 0em);

}

.char:nth-child(1) .tile:nth-child(2):before {

animation: rottile1_1_2 18s infinite;

animation-play-state: running !important;

}

@keyframes rottile1_1_3 {

from, to, 0.92593%, 20.37037%, 28.125%, 47.56944%, 55.99415%, 92.10526% {

transform: rotate3d(1, -1, 0, 0deg);

color: #ecf0f1;

}

5.09259%,

16.2037%,

32.29167%,

43.40278%,

60.16082%,

87.9386% {

transform: rotate3d(1, -1, 0, 90deg);

color: #bdc3c7;

}

}

.char:nth-child(1) .tile:nth-child(3) {

top: 0;

left: 0;

transform: translate(2em, 0em);

}

.char:nth-child(1) .tile:nth-child(3):before {

animation: rottile1_1_3 18s infinite;

animation-play-state: running !important;

}

@keyframes rottile1_1_4 {

from, to, 1.38889%, 20.83333%, 28.29861%, 47.74306%, 56.21345%, 92.32456% {

transform: rotate3

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值