Как сделать цветное пятно на background?

Рейтинг: 0Ответов: 1Опубликовано: 14.03.2023

Как можно сделать такое пятно на background?введите сюда описание изображения

Ответы

▲ 0

Поскольку spot в absolute, он никак не будет влиять на внутренние элементы.

* {
  box-sizing: border-box;
}
div {
  display: block;
}
body {
  margin: 0;
}
.black {
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  position: relative;
}
.spot {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  
}
.spot span {
  width: 60%;
  height: 100px;
  background: rgba(48,34,21,1);
  border-radius: 50%;
  box-shadow: 0 0 40px 50px rgba(48,34,21,1);
}
<div class="black">
<div class="spot"><span></span></div>
</div>