0

Есть рабочий код:

background:url('/wp-content/images/flag.png') #c6e3fe 7% 10px no-repeat;

Но я захотел всунуть градиент в это дело:

background:url('/wp-content/images/flag.png') linear-gradient(to bottom,  #ffffff 0%,#c6e3fe 100%) 7% 10px no-repeat;

И конструкция перестала работать.
Есть ли возможность всунуть в эту конструкцию градиент?
Пример на JSFiddle

1 ответ 1

7

Поставьте запятую и все будет работать.

background:url('/wp-content/images/flag.png'), linear-gradient(to bottom,  #ffffff 0%,#c6e3fe 100%) 7% 10px no-repeat
2
  • Точно! Спасибо! И ещё надо поменять местами значения: background:url('/wp-content/images/flag.png') 7% 10px no-repeat, linear-gradient(to bottom, #ffffff 0%,#c6e3fe 100%);
    – I_CaR
    10 ноя 2018 в 23:55
  • @I_CaR , верно!)
    – Node_pro
    11 ноя 2018 в 16:15

Ваш ответ

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

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