如何在 HTML 甜甜圈上制作阴影(问题)

问题描述 投票:0回答:0

我是初学者,在甜甜圈上应用“阴影”时遇到问题。

我尝试将以下样式应用于我的甜甜圈的彩色区域

box-shadow: inset -5px -5px 9px rgba(255,255,255,0.45), inset 5px 5px 9px rgba(94,104,121,0.3);

body {
  background: #dde1e7;
  text-align: center;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  flex-wrap: wrap;
  box-sizing: border-box;
  height: 100vh;
  padding: 30px;
}

.margin {
  margin: 25px;
}

.multi-graph {
  width: 300px;
  height: 150px;
  position: relative;
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.multi-graph .graph {
  width: 300px;
  height: 150px;
  position: relative;
  border: 50px solid var(--fill);
  border-top: none;
  position: absolute;
  transform-origin: 50% 0%;
  border-radius: 0 0 300px 300px;
  left: 0;
  top: 100%;
  z-index: 5;
  transform: rotate(calc(var(--percentage) * 1.8deg));
  box-sizing: border-box;

}
<div class="multi-graph margin">
  <div class="graph" data-name="secteur" style="--percentage : 33.75; --fill: #dde1e7; "></div>
  <div class="graph" data-name="Angular" style="--percentage : 22.5; --fill: red ;"></div>
  <div class="graph" data-name="React" style="--percentage : 11.25; --fill: green ;"></div>
</div>

在此先感谢您的帮助

我四处寻找请帮助我

html css styles shadow
© www.soinside.com 2019 - 2024. All rights reserved.