div+css实现数字序号卡片效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现数字序号卡片效果代码

代码标签: div css 数字 序号 卡片

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

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

<head>
  <meta charset="UTF-8">
  
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.css">
  <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wdth,wght@8..144,50..84,300..750&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap" rel="stylesheet">



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

:root {
  --color-lime: #dae470;
  --color-teal: #009ba4;
  --color-purple: #8b67ac;
  --color-yellow: #ffe600;
  --color-pink: #e585c6;
  --color-lightblue: #80bfff;
  --color-black: #000;
  --color-white: #fff;
  --color-gray: #545454;
  --gradient-lightblue-teal: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.3) 100%
    ),
    radial-gradient(
      81.34% 70.71% at 100% 0%,
      rgba(255, 230, 0, 0.4) 0%,
      rgba(255, 230, 0, 0) 100%
    ),
    linear-gradient(53deg, var(--color-lightblue) 0%, var(--color-teal) 102.3%);
  --gradient-pink-yellow: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.3) 100%
    ),
    radial-gradient(
      81.34% 70.71% at 100% 0%,
      rgba(248, 235, 84, 0.8) 0%,
      rgba(248, 235, 84, 0) 100%
    ),
    linear-gradient(307deg, var(--color-yellow) 1.91%, var(--color-pink) 98.08%);
  --gradient-lime-teal: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.3) 100%
    ),
    radial-gradient(
      81.34% 70.71% at 100% 0%,
      rgba(255, 230, 0, 0.5) 0%,
      rgba(255, 230, 0, 0) 100%
    ),
    linear-gradient(110deg, var(--color-lime) 0.84%, var(--color-teal) 132.41%);
  --gradient-purple-pink: linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.3) 100%
    ),
    radial-gradient(
      81.34% 70.71% at 100% 0%,
      rgba(128, 191, 255, 0.5) 0%,
      rgba(128, 191, 255, 0) 100%
    ),
    linear-gradient(307deg, var(--color-pink) 1.91%, var(--color-purple) 98.08%);
}

body {
  font-family: "Roboto Flex", sans-serif;
}

.service-cards-grid {
  list-style-type: none;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  margin: 0;
  padding: 0;
}
@media screen and (min-width: 60em) {
  .service-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.service-card-wrapper {
  background: var(--gradient);
  container-name: service-card;
  container-type: inline-size;
  overflow: clip;
}

.service-card {
  padding: 2rem 1.5rem;
  padding-inline-start: clamp(1.5rem, -9.3rem + 54cqi, 15rem);
  position: relative;
  height: 100%;
  min-height: clamp(12.5rem, 2.5rem + 50cqi, 25rem);
  background: var(--gradient);
  display: flex;
  align-items: center;
}
.service-card svg {
  position: absolute;
  inset: -3%;
  height: 106%;
  width: 110%;
  z-index: 1;
  opacity: 0.5;
}
.service-card__content {
  max-width: clamp(25rem, 13.636rem + 36.36cqi, 30rem);
  margin-inline: auto;
  z-index: 2;
  position: relative;
}
.service-card__content > * + * {
  margin-block-start: 1em;
}
.service-card_.........完整代码请登录后点击上方下载按钮下载查看

网友评论0