Mam do czynienia z problemem z gradientem liniowym w chrome. Oto mój kod
div{
background: linear-gradient(20deg, rgb(213, 213, 55), rgb(158, 158, 33));
background: -webkit-linear-gradient(20deg, rgb(213, 213, 55), rgb(158, 158, 33));
background: -moz-linear-gradient(20deg, rgb(213, 213, 55), rgb(158, 158, 33));
background: -o-linear-gradient(20deg, rgb(213, 213, 55), rgb(158, 158, 33));
width:400px;
height:400px;
}
<div>
</div>
Podczas korzystania z gradientu niektóre paski występują w chromie. Gradient nie wygląda gładko na chromie. Oto zrzut ekranu dla tego samego.
Proszę pomóż.
Odpowiedzi:
1 dla odpowiedzi № 1Możesz spróbować użyć 2 warstw. Od koloru do przezroczystości i nakładaj je na siebie nawzajem:
div {
position: relative;
background: linear-gradient(20deg, rgb(213, 213, 55), transparent);
width: 400px;
height: 400px;
}
div:before {
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: linear-gradient(20deg, transparent, rgb(158, 158, 33));
}
<div>
</div>