CSS gradient background works horizontally but not vertically

Asked

Viewed 625 times

2

The replica of the code: https://codepen.io/utamo/pen/XoyzWN

when applying on the body:

background: linear-gradient(to right, #33ccff 0%, #ff99cc 100%);

I have the following result inserir a descrição da imagem aqui

but when switching to

background: linear-gradient(to bottom, #33ccff 0%, #ff99cc 100%);

ends up like this inserir a descrição da imagem aqui

I know it’s something simple but I lack knowledge at the moment

1 answer

4


Places your html and body at 100% height and background-repeat: no-repeat

Browser other questions tagged

You are not signed in. Login or sign up in order to post.