js+css实现文字矩阵云下雨动画效果代码
代码语言:html
所属分类:动画
代码描述:js+css实现文字矩阵云下雨动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); * { margin: 0; padding:0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } :root{ --clr: #0f0; } body{ display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #000; transform: scale(0.6); } .container { position: relative; top: 100px; height: 400px; width: 100%; display: flex; justify-content: center; animation: animateColor 5s linear infinite ; } @keyframes animateColor { 0%{ filter: hue-rotate(0deg); } 100%{ filter: hue-rotate(360deg); } } .container .cloud { position: relative; width: 300px; /* height: 300px; */ z-index: 100; filter: drop-shadow(0 0 35px var(--clr)); } .container .cloud h2 { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #000; font-size: 2em; z-index: 1000; font-weight: 400; padding:0 10px; border-radius: 10px; text-transform: uppercase; background: var(--clr); } .container .cloud h2::before { content: ''; position: absolute; top: -115px; left: 50%; transform: translateX(-50%); border-radius: 100px; width: 120%; height: 100px; background: var(--clr); } .container .cloud h2::after{ content: ''; position: absolute; top: -150px; left: 25px; width: 120px; height: 120px; border-radius: 50%; background: var(--clr); box-shadow: 120px -30px 0 10px var(--clr.........完整代码请登录后点击上方下载按钮下载查看
网友评论0