0

Помогите, пожалуйста.. Как задать такой градиент для сзади изображения?сам градиент с изображением

2 ответа 2

0

box-shadow у дополнительного блока со скругленными краями.

.container {
  position: relative;
  margin: 100px;
  display: inline-flex;
}

.container img {}

.shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 90px red;
  border-radius: 100%;
  z-index: -1;
}
<div class="container">
  <div class="shadow"></div>
  <img src="https://icdn8.digitaltrends.com/image/digitaltrends/screenshot_20200507-124732_settings-640x640.jpg" width=144 height=320/>

</div>

0

Можно с помощью box-shadow (поиграйтесь с параметрами и подберите подходящую Вам тень):

.wrapper {
  transform: translate(50%, 50%);
  width: 300px;
  height: 300px;
  background-color: #000;
  box-shadow: 0 0 100px -20px darksalmon, 0 0 100px -20px darksalmon;
}
<div class="wrapper"></div>

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.