V
V
Vladislav2021-08-12 07:59:28
css
Vladislav, 2021-08-12 07:59:28

Why is the gradient not displaying correctly on MacOS?

On Windows, the gradient works everywhere as it should 6114aa6b16411312960166.jpeg
; on Mac, it goes to black. not to transparency
6114aa8bbcd6d747631899.jpeg
gradient code

background-image: linear-gradient(270deg, #535aab, #0000);
    background-image: -webkit-gradient(linear, right top, left top, from(#535aab), to(#0000));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2021-08-12
@SlavaMaxwell

Because safari doesn't understand transparency in hex colors. Change #0000to rgba(0,0,0,0).And even better, convert both colors to rgba and change only the transparency:

background-image: linear-gradient(270deg, rgba(83,90,171,1), rgba(83,90,171,0));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question