Fullscreen background image slideshow css html

Fullscreen background image slideshow css html

Today we are sharing with you some fullscreen background slideshow builds using pure CSS and HTML Creating a responsive fullscreen background slideshow that uses CSS3 animations for cross-fade transition effects and also makes a title appear using CSS animations.

We’ll create fullscreen background image slideshow using CSS different image transitions and also make a title appear using CSS animations.

Your can also read how to animate text using CSS

Note that this will only work in browsers supporting CSS animations.

This tutorial is a part of my latest CSS3 experiment, I need a background image slide show but don’t want to use javascript so that’s why i am sharing with you.

Css background image slideshow code below:

html {min-height: 100%;}
body {height: 100%;}

.slideshow, .slideshow:after {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0px;
	left: 0px;
	z-index: 0;
}
.slideshow:after {
	content: '';
	background: transparent;
}
.slideshow li span {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0px;
	left: 0px;
	color: transparent;
	background-size: cover;
	background-position: 50% 50%;
	background-repeat: none;
	opacity: 0;
	z-index: 0;
	-webkit-backface-visibility: hidden;
	-webkit-animation: imageAnimation 24s linear infinite 0s;
	-moz-animation: imageAnimation 24s linear infinite 0s;
	-o-animation: imageAnimation 24s linear infinite 0s;
	-ms-animation: imageAnimation 24s linear infinite 0s;
	animation: imageAnimation 24s linear infinite 0s;
}
.slideshow li:nth-child(1) span {
	background-image: url(image1.jpg');
}
.slideshow li:nth-child(2) span {
	background-image: url(image2.jpg');
	-webkit-animation-delay: 6s;
	-moz-animation-delay: 6s;
	-o-animation-delay: 6s;
	-ms-animation-delay: 6s;
	animation-delay: 6s;
}
.slideshow li:nth-child(3) span {
	background-image: url(image3.jpg');
	-webkit-animation-delay: 12s;
	-moz-animation-delay: 12s;
	-o-animation-delay: 12s;
	-ms-animation-delay: 12s;
	animation-delay: 12s;
}
.slideshow li:nth-child(4) span {
	background-image: url(image4.jpg');
	-webkit-animation-delay: 18s;
	-moz-animation-delay: 18s;
	-o-animation-delay: 18s;
	-ms-animation-delay: 18s;
	animation-delay: 18s;
}
/* Animation for the slideshow images */
@-webkit-keyframes imageAnimation { 
	8% {
		opacity: 1;
		-webkit-transform: scale(1.05);
		-webkit-animation-timing-function: ease-out;
	}
	17% {
		opacity: 1;
		-webkit-transform: scale(1.1);
	}
	25% {
		opacity: 0;
		-webkit-transform: scale(1.1);
	}
	100% { opacity: 0 }
}
@-moz-keyframes imageAnimation { 
	8% {
		opacity: 1;
		-moz-transform: scale(1.05);
		-moz-animation-timing-function: ease-out;
	}
	17% {
		opacity: 1;
		-moz-transform: scale(1.1);
	}
	25% {
		opacity: 0;
		-moz-transform: scale(1.1);
	}
	100% { opacity: 0 }
}
@-o-keyframes imageAnimation { 
    8% {
		opacity: 1;
		-moz-transform: scale(1.05);
		-moz-animation-timing-function: ease-out;
	}
	17% {
		opacity: 1;
		-moz-transform: scale(1.1);
	}
	25% {
		opacity: 0;
		-moz-transform: scale(1.1);
	}
	100% { opacity: 0 }
}
@-ms-keyframes imageAnimation { 
	8% {
		opacity: 1;
		-moz-transform: scale(1.05);
		-moz-animation-timing-function: ease-out;
	}
	17% {
		opacity: 1;
		-moz-transform: scale(1.1);
	}
	25% {
		opacity: 0;
		-moz-transform: scale(1.1);
	}
	100% { opacity: 0 }
}
@keyframes imageAnimation { 
	8% {
		opacity: 1;
		-moz-transform: scale(1.05);
		-moz-animation-timing-function: ease-out;
	}
	17% {
		opacity: 1;
		-moz-transform: scale(1.1);
	}
	25% {
		opacity: 0;
		-moz-transform: scale(1.1);
	}
	100% { opacity: 0 }
}

/* Show at least something when animations not supported */
.no-cssanimations .slideshow li span{
    opacity: 1;
}

Html background image slideshow code below:

<ul class="slideshow">
	<li> <span></span> </li>
	<li> <span></span> </li>
	<li> <span></span> </li>
	<li> <span></span> </li>
</ul>

You can find some of live example of full screen image slide show:

Css background image slideshow code
  1. https://codepen.io/leetech/pen/AJGLq
  2. https://tympanus.net/Tutorials/CSS3FullscreenSlideshow/index.html
  3. https://codepen.io/klesht/pen/vEOjrz
About Author

My name is Mukesh Jakhar and I am a Web Application Developer and Software Developer, currently living in Jaipur, India. I have a Master of Computer Application in Computer Science from JNU Jaipur University. I loves to write on technology and programming topics. Apart from this, I love to travel and enjoy the beauty of nature.

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.