css+div实现数字感谢牌效果代码

代码语言:html

所属分类:布局界面

代码描述:css+div实现数字感谢牌效果代码,色彩不断变幻。

代码标签: css div 数字 感谢牌

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  



        <link href="https://fonts.bunny.net/css?family=alatsi:400" rel="stylesheet" />


  
  
<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --clr-bg: rgb(51, 65, 85);
  --clr-primary: rgb(3, 28, 68);
  --clr-secondary: rgb(198, 230, 248);
}

body {
  min-height: 100svh;
  background-color: var(--clr-bg);
  color: var(--clr-primary);
  display: grid;
  place-content: center;
  font-size: 1rem;
  font-family: "Alatsi", sans-serif;
}

.celebration {
  position: relative;
  display: grid;
  grid-template-areas: "stack";
  place-items: center;
  background-color: var(--clr-secondary);
  width: 360px;
  height: 200px;
  line-height: 0;
  border-radius: 15px;
  filter: drop-shadow(4px 4px 0 #e78b8b) hue-rotate(180deg);
}

.celebration::before {
  content: "";
  position: absolute;
  inset: auto -300px;
  height: 1.5rem;
  background: radial-gradient(circle, var(--clr-primary) 0%, transparent 75%);
  z-index: -1;
  translate: 0 0.35rem;
  /* on codepen for some reason this element is overflowing  the h2*/
}

p {
  margin-top: 0.75rem;
  margin-right: 0.25rem;
  text-align: right;
  color: var(--clr-secondary);
  font-size: 0.9rem;
  font-weight: 300;
}

.celebration > * {
  position: relative;
  grid-area: stack;
}

h1 {
  font-size: 10rem;
  font-weight: 700;
  z-index: 1;
  /*filter: invert(70%);*/
  filter: drop-shadow(4px 4px 0 #e78b8b) hue-rotate(180deg);
}

h2 {
  font-size: 1rem;
  letter-spacing: 0.9rem;
  background: var(--clr.........完整代码请登录后点击上方下载按钮下载查看

网友评论0