0
I have a panel where there is a button that pulls a function that takes a while to run, so I wanted to put an img of load and background with alpha, but it’s only taking a part of the screen equal to print:
My CSS and HTML code:
.load {
position: fixed;
background-color: rgba(0,0,0,0.8);
z-index: 5;
width: 100vw;//ja tentei usando 100% tbm
height: 100vh;//ja tentei usando 100% tbm
overflow: hidden;
}
.load img{
margin: auto auto;
}
<div class="load"><img src="load.gif"></div>
is best to use % or vh/vw?
– Faillen
In your case I would go vh/vw because it refers to the viewport, to ensure that it really will cover the entire visible area!
– hugocsl
thanks for clearing my doubts
– Faillen