I would like to add an image that covers the main page of my website.
This image should then disappear after a few seconds.
I tried but the image takes the space of the elements under ruining everything.
How can I do?
Thank you!!!!`
I apologize if I have not immediately provided an example
I simply tried to use CSS to make the image disappear
#fadeout {
opacity: 1;
transition: 1s opacity;
text-align: center;
font-size:32px;
}
p {
text-align: center;
}
Then I tried to make the image disappear with javascript:
window.onload = function() {
window.setTimeout(fadeout, 3000);
}
function fadeout() {
document.getElementById('TEST').style.opacity = '0';
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…