文字遮罩显示动画效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> /* reset */ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } body { display: flex; flex-direction: column; justify-content: space-around; align-items: center; min-height: 100vh; padding: 20px; font-family: -apple-system, BlinkMacSystemFont,'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } /* other */ .info { margin: 20px 0; text-align: center; } p { color: #2e2e2e; margin-bottom: 20px; } a, a:link, a:visited { color: #0f0f0f; font-weight: bold; text-decoration: none; border-bottom: 2px solid #2e2e2e; } /* block-$ */ .block-effect { font-size: calc(8px + 6vw); } .block-reveal { --t: calc(var(--td) + var(--d)); color: transparent; padding: 4px; position: relative; overflow: hidden; -webkit-animation: revealBlock 0s var(--t) forwards; animation: revealBlock 0s var(--t) forwards; } .block-reveal::after { content: ''; width: 0%; height: 100%; padding-bottom: 4px; position: absolute; top: 0; left: 0; background: var(--bc); -webkit-animation: revealingI.........完整代码请登录后点击上方下载按钮下载查看
网友评论0