div+css实现文字大气出场动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现文字大气出场动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Paytone+One&display=swap'> <style> @import url("https://fonts.googleapis.com/css2?family=Kanit:wght@100&display=swap"); :root { --sp: 12s; --white: #ffffff; } body { margin: 0; font-family: "Kanit", sans-serif; font-size: 3vmin; box-sizing: border-box; width: 100vw; height: 100vh; overflow: hidden; background: #203a43; background: radial-gradient(ellipse at 50% 50%, #011116 0%, #000000 100%); display: flex; align-items: center; justify-content: center; } .content { display: flex; align-items: center; justify-content: center; position: relative; width: 90vmin; } .content div { position: absolute; display: flex; animation: show-hide var(--sp) ease 0s infinite; mix-blend-mode: plus-lighter; } @keyframes show-hide { 0%, 100% { opacity: 0; transform: scale(0.8); } 20%, 80% { opacity: 1; transform: scale(1); } } .content div span { width: 10vmin; position: relative; text-align: center; box-sizing: border-box; color: #ffffff90; text-shadow: 0 0 1px var(--white); } .up:before, .down:before { width: 80%; height: 0.1vmin; background: radial-gradient(ellipse at 50% 50%, var(--white), #ffffff00 70%); content: ""; position: absolute; border-radius: 100%; filter: blur(2px); left: 10%; top: 49%; box-shadow: 0 0 100px 0 var(--white); animation: shadow var(--sp) ease 0s infinite; } .down:before { width: 1vmin; height: 0.5vmin; filter: blur(3px); left: calc(50% - 0.5vmin); top: 45%; box-shadow: 0 0 10px 0 var(--white); } @keyframes shadow { 0%, 10%, 90%, 100% { opacity: 0; } 45%, 55% { opacity: 0.25; height: 0.25vmin; } } .up span, .down span { animation-duration: var(--sp); animation-timing-function: ease; animation-delay: 0s; animation-iteration-count: infinite; } /*up*/ .up-2-8 { animation-name: go-up-2-8; } .up-3-7 { animation-name: go-up-3-7; } .up-4-6 { animation-name: go-up-4-6; } .up-5 { animation-name: go-up-5; } /*down*/ .down-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0