css文字字母依次三维翻转动画效果代码
代码语言:html
所属分类:动画
代码描述:css文字字母依次三维翻转动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html class=""> <head> <style> @charset "utf-8"; html { background-color: gray; } ul { width: 100%; -webkit-transform: translate(0, -50%); transform: translate(0, -50%); position: absolute; text-align: center; font-size: 0; left: 0; top: 50%; } ul li { display: inline-block; position: relative; text-align: center; line-height: 15vw; margin: 2vw 0; height: 15vw; width: 15vw; } @media screen and (orientation: landscape) { ul li { line-height: 15vh; margin: 2vh 0; height: 15vh; width: 15vh; } } ul li:before, ul li:after { -webkit-transition: -webkit-transform 0.25s ease-in-out; transition: -webkit-transform 0.25s ease-in-out; transition: transform 0.25s ease-in-out; transition: transform 0.25s ease-in-out, -webkit-transform 0.25s ease-in-out; content: attr(data-letter); font-family: sans-serif; font-weight: 100; font-size: 3vw; position: absolute; height: 100%; width: 100%; left: 0; top: 0; } @media screen and (orientation: landscape) { ul li:before, ul li:after { font-size: 3vh; } } ul li[data-letter=" "] { opacity: 0; } ul li:before { -webkit-transform-origin: top center; transform-origin: top center; -webkit-transform: translate(0, 100%) rotateX(-90deg); transform: translate(0, 100%) rotateX(-90deg); background-color: black; z-index: 1; color: white; } ul li:after { -webkit-transform: translate(0, 0) rotateX(0deg); transform: translate(0, 0) rotateX(0deg); -webkit-transform-origin: bottom center; transform-origin: bottom center; background-color: white; z-index: 1; color: black; } ul li:nth-of-type(10n+1):before { -webkit-transition-delay: 0s; transition-delay: 0s; } ul li:nth-of-type(10n+2):before { -webkit-transition-delay: 0.05s; transition-delay: 0.05s; } ul li:nth-of-type(10n+3):before { -webkit-transition-delay: 0.1s; transition-delay: 0.1s; } ul li:nth-of-type(10n+4):before { -webkit-transition-delay: 0.15s; transition-delay: 0.15s; } ul li:nth-of-type(10n+5):before { -webkit-transition-delay: 0.2s; transition-delay: 0.2s; } ul li:nth-of-type(10n+6):before { -webkit-transition-delay: 0.25s; transition-delay: 0.25s; } ul li:nth-of-type(10n+7):before { -webkit-transition-delay: 0.3s; transition-delay: 0.3s; } ul li:nth-of-type(10n+8):before { -webkit-transition-delay: 0.35s; transition-delay: 0.35s; } ul li:nth-of-type(10n+9):before { -webkit-transition-delay: 0.4s; transition-delay: 0.4s; } ul li:nth-of-type(10n+10):before { -webkit-transiti.........完整代码请登录后点击上方下载按钮下载查看
网友评论0