Pure CSS image slider

Developer
Size
2,256 Kb
Views
30,360

How do I make an pure css image slider?

Image slider made from pure CSS with transitions.. What is a pure css image slider? How do you make a pure css image slider? This script and codes were developed by Billy Brown on 30 September 2022, Friday.

Pure CSS image slider Previews

Pure CSS image slider - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS image slider</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ .slider-container { height: 400px; margin: 0 auto; position: relative; width: 400px;
}
.img-container { border: 1px solid black; height: 300px; overflow: hidden; width: 100%;
}
img { transition: .2s linear all;
}
input { -webkit-appearance: none; background: linear-gradient(#7bf, #58f); border: 1px solid #55f; border-radius: 7px; box-shadow: 0 1px 2px -1px black; cursor: pointer; height: 14px; margin: 20px 58px; width: 14px;
}
input:checked { background: linear-gradient(#9df, #7bf);
}
.slider-button-1:checked ~ .img-container img { transform: translateX(0);
}
.slider-button-2:checked ~ .img-container img { transform: translateX(-300px);
}
.slider-button-3:checked ~ .img-container img { transform: translateX(-620px);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="slider-container"> <input type="radio" name="img-slider" class="slider-button-1" checked>	<input type="radio" name="img-slider" class="slider-button-2">	<input type="radio" name="img-slider" class="slider-button-3">	<div class="img-container">	<img src="http://i1124.photobucket.com/albums/l565/Druid_of_Luhn/img-slider.gif">	</div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Pure CSS image slider - Script Codes CSS Codes

.slider-container { height: 400px; margin: 0 auto; position: relative; width: 400px;
}
.img-container { border: 1px solid black; height: 300px; overflow: hidden; width: 100%;
}
img { transition: .2s linear all;
}
input { -webkit-appearance: none; background: linear-gradient(#7bf, #58f); border: 1px solid #55f; border-radius: 7px; box-shadow: 0 1px 2px -1px black; cursor: pointer; height: 14px; margin: 20px 58px; width: 14px;
}
input:checked { background: linear-gradient(#9df, #7bf);
}
.slider-button-1:checked ~ .img-container img { transform: translateX(0);
}
.slider-button-2:checked ~ .img-container img { transform: translateX(-300px);
}
.slider-button-3:checked ~ .img-container img { transform: translateX(-620px);
}
Pure CSS image slider - Script Codes
Pure CSS image slider - Script Codes
Home Page Home
Developer Billy Brown
Username _Billy_Brown
Uploaded September 30, 2022
Rating 3
Size 2,256 Kb
Views 30,360
Do you need developer help for Pure CSS image slider?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Billy Brown (_Billy_Brown) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!