splitting实现多种文字字母跳动动画效果代码
代码语言:html
所属分类:动画
代码描述:splitting实现多种文字字母跳动动画效果代码
代码标签: splitting 多种 文字 字母 跳动 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/splitting.css">
<style>
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap");
* {
box-sizing: border-box;
}
html, body {
margin: 0;
height: 100%;
}
.container {
max-height: 100vh;
overflow-y: scroll;
position: relative;
scroll-snap-type: y mandatory;
-webkit-overflow-scrolling: touch;
}
.headline {
align-items: center;
background-color: var(--color);
display: flex;
font-family: "Noto Sans", sans-serif;
font-weight: 700;
font-size: 6rem;
height: 100vh;
justify-content: center;
overflow: hidden;
perspective: 1000px;
scroll-snap-align: start;
}
.headline:nth-child(1) {
--color: #3399dd;
}
.headline:nth-child(2) {
--color: #ff8888;
}
.headline:nth-child(3) {
--color: #11bb99;
}
.headline:nth-child(4) {
--color: #ff22cc;
}
.headline:nth-child(5) {
--color: #ee7733;
}
.headline:nth-child(6) {
--color: #ffcc99;
}
.headline:nth-child(7) {
--color: #99dd33;
}
.word, .char {
animation-delay: var(--del);
animation-direction: var(--dir, normal);
animation-duration: var(--dur);
animation-iteration-count: var(--it, infinite);
animation-name: var(--name);
animation-timing-function: var(--tf);
animation-fill-mode: var(--fill, forwards);
display: inline-block;
position: relative;
transform-origin: 50% 100%;
z-index: 1;
}
#controls {
position: fixed;
top: 10px;
left: 10px;
z-index: 100;
display: flex;
align-items: center;
}
.btn {
background-color: rgba(0, 0, 0, 0.4);
border: none;
color: rgba(255, 255, 25.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0