css文字移动影子动画效果代码
代码语言:html
所属分类:动画
代码描述:css文字移动影子动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Staatliches&display=swap'); .jt { position: relative; font-size: 20vmin; font-family: 'Staatliches', sans-serif; text-transform: uppercase; font-display: swap; } .jt__row { display: block; } .jt__row:nth-child(1) { -webkit-clip-path: polygon(0% 75%, 100% 75%, 100% 100%, 0% 100%); clip-path: polygon(0% 75%, 100% 75%, 100% 100%, 0% 100%); } .jt__row:nth-child(2) { -webkit-clip-path: polygon(0% 50%, 100% 50%, 100% 75.5%, 0% 75.5%); clip-path: polygon(0% 50%, 100% 50%, 100% 75.5%, 0% 75.5%); } .jt__row:nth-child(3) { -webkit-clip-path: polygon(0% 25%, 100% 25%, 100% 50.5%, 0% 50.5%); clip-path: polygon(0% 25%, 100% 25%, 100% 50.5%, 0% 50.5%); } .jt__row:nth-child(4) { -webkit-clip-path: polygon(0% 0%, 100% -10%, 100% 35.5%, 0% 25.5%); clip-path: polygon(0% 0%, 100% -10%, 100% 35.5%, 0% 25.5%); } .jt__row:nth-child(5) { -webkit-clip-path: polygon(0% -25%, 100% -45%, 100% -9.5%, 0% 0.5%); clip-path: polygon(0% -25%, 100% -45%, 100% -9.5%, 0% 0.5%); } .jt__row:nth-child(6) { -webkit-clip-path: polygon(0% -50%, 100% -85%, 100% -44.4%, 0% -24.5%); clip-path: polygon(0% -50%, 100% -85%, 100% -44.4%, 0% -24.5%); } .jt__row.jt__row--sibling { position: absolute; top: 0; left: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .jt__text { display: block; -webkit-transform-origin: bottom left; transform-origin: bottom left; -webkit-animation: moveIn 2s cubic-bezier(.36,0,.06,1) alternate infinite; animation: moveIn 2s cubic-bezier(.36,0,.06,1) alternate infinite; } .jt__row:nth-child(1) .jt__text { -webkit-transform: translateY(-0.1em); transform: translateY(-0.1em); } .jt__row:nth-child(2) .jt__text { -webkit-transform: translateY(-0.3em) scaleY(1.1); transform: translateY(-0.3em) scaleY(1.1); } .jt__row:nth-child(3) .jt__text { -webkit-transform: translateY(-0.5em) scaleY(1.2) rotate(-1deg); transform: translateY(-0.5em) scaleY(1.2) rotate(-1deg); } .jt__row:nth-child(4) .jt__text { -webkit-transform: translateY(-0.7em) scaleY(1.3) rotate(-2deg.........完整代码请登录后点击上方下载按钮下载查看
网友评论0