0

Как задать полупрозрачность линейному градиенту?

Вот код:

.header {
    min-height: 100vh;
    background: url(../img/header__bg.jpg) no-repeat center -100px / cover;
    padding-top: 25px;
    padding-bottom: 100px;
    position: relative;
    z-index: 1000;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(#fce38a, #f38181);
    z-index: -1000;
}

1 ответ 1

2

Так?

body {
  background: url('https://i.sunhome.ru/cards/113/otkritki-valentine-s-day-kartinki.orig.jpg') no-repeat center center / cover;
  margin: 0;
}

.gradient {
    width: 100wh;
    height: 100vh;
    background: linear-gradient(rgba(252,227,138,.85), rgba(243,129,129,.85));
}
<div class="gradient"></div>

Ваш ответ

Нажимая на кнопку «Отправить ответ», вы соглашаетесь с нашими пользовательским соглашением, политикой конфиденциальности и политикой о куки

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