css 用于信息图表的响应式html [已关闭]

bf1o4zei  于 2023-01-03  发布在  其他
关注(0)|答案(1)|浏览(109)

7小时前关闭。
Improve this question
有人能帮我写下面信息图表/UI的HTML吗
注:每个块将具有不同的标题和描述

yrdbyhpb

yrdbyhpb1#

这里有一些东西可以让你开始。你必须在每个div上覆盖文本。

body {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.background {
  position: relative;
  display: grid;
  place-items: center;
  width: 500px;
  aspect-ratio: 1;
  background: radial-gradient(rgba(98, 162, 178, 1) 0%, rgba(98, 162, 178, 1) 30%, rgba(255, 255, 255, 1) 70%);
}

.container {
  --distance-p: 75%;
  --distance-n: calc(-1 * var(--distance-p));
  position: relative;
  display: grid;
  place-items: center;
  width: 300px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 100vh;
}

.segment {
  position: absolute;
  width: 200px;
  aspect-ratio: 1;
  background-color: #DDF8FF;
  border-radius: 1.25rem;
  overflow: hidden;
  transform-origin: center;
}

.segment::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  height: 2rem;
  aspect-ratio: 1;
  background-color: #F7A41D;
  border-top-left-radius: 1.25rem;
}

.s1 {
  transform: translate(0, var(--distance-n)) rotate(45deg);
}

.s2 {
  transform: translate(var(--distance-p), 0) rotate(135deg);
}

.s3 {
  transform: translate(0, var(--distance-p)) rotate(225deg);
}

.s4 {
  transform: translate(var(--distance-n), 0) rotate(315deg);
}

.text {
  position: relative;
  color: #0B586F;
  z-index: 1;
}

.t1 {
  transform: translate(0, -100px);
}
<div class='background'>
  <div class='container'>
    <div class='segment s1'>
    </div>
    <div class='text t1'>Empathy</div>

    <div class='segment s2'>
    </div>
    <div class='segment s3'>
    </div>
    <div class='segment s4'>
    </div>
  </div>
</div>

相关问题