Presentation Image Css - Javascript
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 un
Solution 1:
Personally I would just do a quick css anim as a simple fake splash loader like;
@keyframes reveal {
0% {opacity: 1;}
75% {opacity: 1;}
99% {opacity: 0;}
100% {opacity: 0; display: none;}
}
#splash-loader {
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
background: lightgray url('https://i.imgur.com/bX2Uk7C.jpg') no-repeat center;
background-size: cover;
opacity: 0;
animation: reveal 6s ease forwards;
}
#spinner {
height: 10rem;
width: 10rem;
margin: 5rem auto;
border-radius: 50%;
background-repeat: no-repeat;
background-position: center center;
background-color: rgba(255,255,255,.5);
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgaWQ9InNwaW4taWNvbiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwMCA3MDAiIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiPiAgICA8c3R5bGU+ICAgIEAtd2Via2l0LWtleWZyYW1lcyBzcGluTG9hZCB7ICAgICAgdG8geyAgICAgICAgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyAgICAgICAgLW1vei10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyAgICAgICAgLW1zLXRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7ICAgICAgICAtby10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyAgICAgICAgdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTsgICAgICB9ICAgIH0gICAgQC1tb3ota2V5ZnJhbWVzIH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5MiAwIDBjLTIgMS00IDEtNiAxeiAgIG0tNTY2LTVjLTEgMC0zIDAtNS0xbC0xNTctOTFjMCAwLTEgMC0xIDAtNS0zLTctMTAtNC0xNmwzNS02MWMzLTUgMTAtNyAxNi00bDE1NyA5MWMwIDAgMCAwIDAgMCA2IDMgOCAxMCA1IDE2bC0zNSA2MWMtMyAzLTcgNi0xMSA1eiAgIG00NjgtMTIxYy0yIDAtNCAwLTYtMWwtNjEtMzVjLTUtNC03LTExLTQtMTZsOTEtMTU3YzAtMSAwLTEgMC0xIDMtNiAxMS03IDE2LTRsNjEgMzVjNSAzIDcgMTAgNCAxNmwtOTEgMTU3YzAgMCAwIDAgMCAwLTIgNC02IDYtMTAgNnogICBtLTM2Ny0yYy00IDAtOC0yLTEwLTZsLTkxLTE1OGMtMy02LTEtMTMgNC0xNmw2MS0zNWM1LTMgMTItMSAxNSA0bDkyIDE1OCAwIDBjMyA2IDEgMTMtNSAxNmwtNjAgMzVjMCAwIDAgMCAwIDAtMiAxLTQgMS02IDJ6ICAgbTE0OS01OGMtNyAwLTEyLTUtMTItMTFsMC0xODMgMCAwYzAtNiA1LTExIDEyLTExbDY5IDBjMCAwIDAgMCAxIDAgNiAwIDExIDUgMTEgMTFsMCAxODMgMCAwYzAgNi01IDExLTExIDExbC02OSAwYy0xIDAtMSAwLTEgMHoiIC8+PC9zdmc+);
}
<divid="splash-loader"><divid="spinner"></div></div><h2>Hey I'm your normal content, howdy</h2>
Hopefully it gives you a direction for imagination. Cheers
Post a Comment for "Presentation Image Css - Javascript"