CSS抖音文字效果,文字彩色抖动效果

#编程技术 2020-09-20 20:06:00 | 全文 198 字,阅读约需 1 分钟 | 加载中... 次浏览

👋 相关阅读


CSS抖音文字效果,文字彩色抖动效果

wTOMvD.jpg

CSS代码(里面渐变颜色可以自己修改)

.doudong{
    animation: uk-text-shadow-glitch .65s cubic-bezier(1,-1.91,0,2.79) 0s infinite normal both running;
	}
@keyframes uk-text-shadow-glitch {
    0% {
        text-shadow: none
    }
    25% {
        text-shadow: -2px -2px 0 #ff004f,2px 2px 0 #00f7ef
    }
    50% {
        text-shadow: 2px -2px 0 #ff004f,-2px 2px 0 #00f7ef
    }
    75% {
        text-shadow: -2px 2px 0 #ff004f,2px -2px 0 #00f7ef
    }
    100% {
        text-shadow: 2px 2px 0 #ff004f,-2px -2px 0 #00f7ef
    }
}
@keyframes uk-flicker {
    0% {
        opacity: 0
    }
    10% {
        opacity: .6;
        transform: scale(.8)
    }
    20% {
        opacity: 0
    }
    40% {
        opacity: 1
    }
    50% {
        opacity: .2;
        transform: scale(1.1)
    }
    100% {
        opacity: 1;
        transform: scale(1)
    }
};
  }
}

然后在你的标签里加入 class="doudong" ,例如

<h1 class="doudong">欢迎来到MDP BLOG!</h1>

via: https://www.madapang.com/technology/csstiktok.html

Edit | Last updated on 2024-04-08 15:48:44




×