div+css实现2024新年快乐文字伸缩动画效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现2024新年快乐文字伸缩动画效果代码

代码标签: div css 2024 新年 快乐 文字 伸缩 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >
<head>
 
<meta charset="UTF-8">
<style>
    @import url("https://fonts.googleapis.com/css2?family=Foldit:wght@300..700&display=swap");
@font-palette-values --color {
  font-family: "Foldit";
  override-colors: 0 #ffe14d, 1 #ff974d, 2 #fde04e, 3 #fde04e;
}
body {
  padding: 2rem;
  min-block-size: 100vb;
  display: grid;
  place-content: center;
  box-sizing: border-box;
  line-height: 1.5;
  font-size: 1.4rem;
  text-align: center;
  font-family: "Foldit", sans-serif;
  background: linear-gradient(120deg, #000933, #cc0000);
  color: #fde04e;
  font-variation-settings: "wght" 300;
  transition: all 0.2s cubic-bezier(0.83, 0, 0.17, 1);
  font-palette: --color;
}

.year,
.message {
  margin: 0;
  line-height: 1;
}

.year {
  margin-block-start: -2rem;
  font-size: 15rem;
}

.message {
  margin-block-start: -1rem;
  font-size: 5rem;
}

.year span,
.message span {
  animation-name: pulse;
  animation-duration: 10s;
  animation-iteration-count: infinite;
  animation-dir.........完整代码请登录后点击上方下载按钮下载查看

网友评论0