css单选radio按钮样式css多选框checkbox样式css响应式汉堡菜单(左滑、抽屉)css实现遮罩层弹出效果一组好看的css按钮效果(6种)css实现select下拉选择框css实现选项卡功能css实现下拉菜单css按钮样式代码(16种)css实现手风琴效果css图片轮播效果css进度条样式css实现侧边栏菜单css加载动画css背景动画效果css开关按钮样式(18种)css炫酷的圆形菜单css提示tooltip效果css手风琴_好看的Gallery伸缩效果css表格样式css分段控件导航栏css折角效果css粒子背景动画效果css进度圆圈连线css响应式分页样式代码css各种天气样式动画图标css层叠卡片滑出特效css下拉Dropdown菜单css圆圈按钮tip提示特效css和svg圆圈进度样式代码css动画404页面代码css爱心跳动动画代码css绘制逼真玻璃球效果css模拟开关灯特效创意css网格布局带动画效果css星级打分radio五角星css卡片悬浮翻转特效div上下浮动纯css动画css时间轴样式(timeLine)css文字循环翻滚动画效果css输入框动效css鼠标悬停缩放比例效果css模糊背景毛玻璃效果css实现小球循环跳动动画css实现标签样式Tagscss进度条阴影动画css绘制的小鸟css svg按钮冒泡动画特效css svg蓝色波浪动画特效css创意svg菜单栏水滴动画css文字进度条的实现CSS实现内容折叠/展开效果CSS3手机充电特效css实现鼠标点击拖拽效果CSS实现一个计时器纯CSS渐变绘制 Chrome 图标CSS 渐变来实现波浪动画纯CSS动态显示屏幕宽高

css图片轮播效果


源码:

<input type="radio" name="slider" id="slide-a-1" checked>
<input type="radio" name="slider" id="slide-a-2">
<input type="radio" name="slider" id="slide-a-3">
<input type="radio" name="slider" id="slide-a-4">
<input type="radio" name="slider" id="slide-a-5">
<input type="radio" name="slider" id="slide-b-1">
<input type="radio" name="slider" id="slide-b-2">
<input type="radio" name="slider" id="slide-b-3">
<input type="radio" name="slider" id="slide-b-4">
<input type="radio" name="slider" id="slide-b-5">
<div class="slider a1 aa1"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a2 aa2"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a3 aa3"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a4 aa4"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a5 aa5"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a1 bb1"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a2 bb2"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a3 bb3"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a4 bb4"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<div class="slider a5 bb5"><ul><li></li><li></li><li></li><li></li><li></li></ul></div>
<nav><label for="slide-a-1"></label><label for="slide-a-2"></label><label for="slide-a-3"></label><label for="slide-a-4"></label><label for="slide-a-5"></label><label for="slide-b-1"></label><label for="slide-b-2"></label><label for="slide-b-3"></label><label for="slide-b-4"></label><label for="slide-b-5"></label></nav>

<style>
html {
background-color: #eee;
}
.slider,
.slider > ul,
.slider > ul > li {
position: absolute;
width: 500px;
height: 300px;
list-style-type: none;
margin: 0;
padding: 0;
}
.slider {
display: none;
overflow: hidden;
left: calc(50% - 250px);
top: calc(50% - 150px);
border: 8px solid #fff;
border-radius: 3px;
box-sizing: content-box;
}
.slider > ul > li:nth-child(1) {
background: url("https://picsum.photos/id/230/500/300");
}
.slider > ul > li:nth-child(2) {
background: url("https://picsum.photos/id/250/500/300");
}
.slider > ul > li:nth-child(3) {
background: url("https://picsum.photos/id/350/500/300");
}
.slider > ul > li:nth-child(4) {
background: url("https://picsum.photos/id/450/500/300");
}
.slider > ul > li:nth-child(5) {
background: url("https://picsum.photos/id/550/500/300");
}
.slider > ul > li {
background-position: center center !important;
background-repeat: no-repeat !important;
background-size: cover !important;
}
nav {
position: absolute;
width: 165px;
height: 15px;
left: calc(50% - 77.5px);
top: calc(50% + 180px);
overflow: hidden;
}
input {
display: none;
}
label {
cursor: pointer;
position: absolute;
z-index: 5;
background: #ccc;
display: block;
width: 15px;
height: 15px;
border-radius: 50%;
}
label:nth-child(1),
label:nth-child(6) {
left: 15px;
}
label:nth-child(2),
label:nth-child(7) {
left: 45px;
}
label:nth-child(3),
label:nth-child(8) {
left: 75px;
}
label:nth-child(4),
label:nth-child(9) {
left: 105px;
}
label:nth-child(5),
label:nth-child(10) {
left: 135px;
}
.a1 > ul > li:nth-child(1),
.a2 > ul > li:nth-child(2),
.a3 > ul > li:nth-child(3),
.a4 > ul > li:nth-child(4),
.a5 > ul > li:nth-child(5) {
animation: opacity-0 10s ease infinite 2s;
z-index: 10;
}
.a1 > ul > li:nth-child(2),
.a2 > ul > li:nth-child(3),
.a3 > ul > li:nth-child(4),
.a4 > ul > li:nth-child(5),
.a5 > ul > li:nth-child(1) {
animation: opacity-0 10s ease infinite 4s;
z-index: 9;
}
.a1 > ul > li:nth-child(3),
.a2 > ul > li:nth-child(4),
.a3 > ul > li:nth-child(5),
.a4 > ul > li:nth-child(1),
.a5 > ul > li:nth-child(2) {
animation: opacity-0 10s ease infinite 6s;
z-index: 8;
}
.a1 > ul > li:nth-child(4),
.a2 > ul > li:nth-child(5),
.a3 > ul > li:nth-child(1),
.a4 > ul > li:nth-child(2),
.a5 > ul > li:nth-child(3) {
animation: opacity-0 10s ease infinite 8s;
z-index: 7;
}
.a1 > ul > li:nth-child(5),
.a2 > ul > li:nth-child(1),
.a3 > ul > li:nth-child(2),
.a4 > ul > li:nth-child(3),
.a5 > ul > li:nth-child(4) {
animation: opacity-0 10s ease infinite 10s;
z-index: 6;
}
#slide-a-1:checked ~ .aa1,
#slide-a-2:checked ~ .aa2,
#slide-a-3:checked ~ .aa3,
#slide-a-4:checked ~ .aa4,
#slide-a-5:checked ~ .aa5,
#slide-b-1:checked ~ .bb1,
#slide-b-2:checked ~ .bb2,
#slide-b-3:checked ~ .bb3,
#slide-b-4:checked ~ .bb4,
#slide-b-5:checked ~ .bb5 {
display: block;
}
#slide-a-1:checked ~ nav label:nth-child(6),
#slide-a-1:checked ~ nav label:nth-child(7),
#slide-a-1:checked ~ nav label:nth-child(8),
#slide-a-1:checked ~ nav label:nth-child(9),
#slide-a-1:checked ~ nav label:nth-child(10),
#slide-a-2:checked ~ nav label:nth-child(6),
#slide-a-2:checked ~ nav label:nth-child(7),
#slide-a-2:checked ~ nav label:nth-child(8),
#slide-a-2:checked ~ nav label:nth-child(9),
#slide-a-2:checked ~ nav label:nth-child(10),
#slide-a-3:checked ~ nav label:nth-child(6),
#slide-a-3:checked ~ nav label:nth-child(7),
#slide-a-3:checked ~ nav label:nth-child(8),
#slide-a-3:checked ~ nav label:nth-child(9),
#slide-a-3:checked ~ nav label:nth-child(10),
#slide-a-4:checked ~ nav label:nth-child(6),
#slide-a-4:checked ~ nav label:nth-child(7),
#slide-a-4:checked ~ nav label:nth-child(8),
#slide-a-4:checked ~ nav label:nth-child(9),
#slide-a-4:checked ~ nav label:nth-child(10),
#slide-a-5:checked ~ nav label:nth-child(6),
#slide-a-5:checked ~ nav label:nth-child(7),
#slide-a-5:checked ~ nav label:nth-child(8),
#slide-a-5:checked ~ nav label:nth-child(9),
#slide-a-5:checked ~ nav label:nth-child(10),
#slide-b-1:checked ~ nav label:nth-child(1),
#slide-b-1:checked ~ nav label:nth-child(2),
#slide-b-1:checked ~ nav label:nth-child(3),
#slide-b-1:checked ~ nav label:nth-child(4),
#slide-b-1:checked ~ nav label:nth-child(5),
#slide-b-2:checked ~ nav label:nth-child(1),
#slide-b-2:checked ~ nav label:nth-child(2),
#slide-b-2:checked ~ nav label:nth-child(3),
#slide-b-2:checked ~ nav label:nth-child(4),
#slide-b-2:checked ~ nav label:nth-child(5),
#slide-b-3:checked ~ nav label:nth-child(1),
#slide-b-3:checked ~ nav label:nth-child(2),
#slide-b-3:checked ~ nav label:nth-child(3),
#slide-b-3:checked ~ nav label:nth-child(4),
#slide-b-3:checked ~ nav label:nth-child(5),
#slide-b-4:checked ~ nav label:nth-child(1),
#slide-b-4:checked ~ nav label:nth-child(2),
#slide-b-4:checked ~ nav label:nth-child(3),
#slide-b-4:checked ~ nav label:nth-child(4),
#slide-b-4:checked ~ nav label:nth-child(5),
#slide-b-5:checked ~ nav label:nth-child(1),
#slide-b-5:checked ~ nav label:nth-child(2),
#slide-b-5:checked ~ nav label:nth-child(3),
#slide-b-5:checked ~ nav label:nth-child(4),
#slide-b-5:checked ~ nav label:nth-child(5) {
top: 0;
}
#slide-a-1:checked ~ nav label:nth-child(1),
#slide-a-1:checked ~ nav label:nth-child(2),
#slide-a-1:checked ~ nav label:nth-child(3),
#slide-a-1:checked ~ nav label:nth-child(4),
#slide-a-1:checked ~ nav label:nth-child(5),
#slide-a-2:checked ~ nav label:nth-child(1),
#slide-a-2:checked ~ nav label:nth-child(2),
#slide-a-2:checked ~ nav label:nth-child(3),
#slide-a-2:checked ~ nav label:nth-child(4),
#slide-a-2:checked ~ nav label:nth-child(5),
#slide-a-3:checked ~ nav label:nth-child(1),
#slide-a-3:checked ~ nav label:nth-child(2),
#slide-a-3:checked ~ nav label:nth-child(3),
#slide-a-3:checked ~ nav label:nth-child(4),
#slide-a-3:checked ~ nav label:nth-child(5),
#slide-a-4:checked ~ nav label:nth-child(1),
#slide-a-4:checked ~ nav label:nth-child(2),
#slide-a-4:checked ~ nav label:nth-child(3),
#slide-a-4:checked ~ nav label:nth-child(4),
#slide-a-4:checked ~ nav label:nth-child(5),
#slide-a-5:checked ~ nav label:nth-child(1),
#slide-a-5:checked ~ nav label:nth-child(2),
#slide-a-5:checked ~ nav label:nth-child(3),
#slide-a-5:checked ~ nav label:nth-child(4),
#slide-a-5:checked ~ nav label:nth-child(5),
#slide-b-1:checked ~ nav label:nth-child(6),
#slide-b-1:checked ~ nav label:nth-child(7),
#slide-b-1:checked ~ nav label:nth-child(8),
#slide-b-1:checked ~ nav label:nth-child(9),
#slide-b-1:checked ~ nav label:nth-child(10),
#slide-b-2:checked ~ nav label:nth-child(6),
#slide-b-2:checked ~ nav label:nth-child(7),
#slide-b-2:checked ~ nav label:nth-child(8),
#slide-b-2:checked ~ nav label:nth-child(9),
#slide-b-2:checked ~ nav label:nth-child(10),
#slide-b-3:checked ~ nav label:nth-child(6),
#slide-b-3:checked ~ nav label:nth-child(7),
#slide-b-3:checked ~ nav label:nth-child(8),
#slide-b-3:checked ~ nav label:nth-child(9),
#slide-b-3:checked ~ nav label:nth-child(10),
#slide-b-4:checked ~ nav label:nth-child(6),
#slide-b-4:checked ~ nav label:nth-child(7),
#slide-b-4:checked ~ nav label:nth-child(8),
#slide-b-4:checked ~ nav label:nth-child(9),
#slide-b-4:checked ~ nav label:nth-child(10),
#slide-b-5:checked ~ nav label:nth-child(6),
#slide-b-5:checked ~ nav label:nth-child(7),
#slide-b-5:checked ~ nav label:nth-child(8),
#slide-b-5:checked ~ nav label:nth-child(9),
#slide-b-5:checked ~ nav label:nth-child(10) {
top: 15px;
}
#slide-a-1:checked ~ nav label:nth-child(6),
#slide-a-2:checked ~ nav label:nth-child(7),
#slide-a-3:checked ~ nav label:nth-child(8),
#slide-a-4:checked ~ nav label:nth-child(9),
#slide-a-5:checked ~ nav label:nth-child(10),
#slide-b-1:checked ~ nav label:nth-child(1),
#slide-b-2:checked ~ nav label:nth-child(2),
#slide-b-3:checked ~ nav label:nth-child(3),
#slide-b-4:checked ~ nav label:nth-child(4),
#slide-b-5:checked ~ nav label:nth-child(5) {
animation: bg-1 10s ease infinite;
}
#slide-a-1:checked ~ nav > label:nth-child(7),
#slide-a-2:checked ~ nav > label:nth-child(8),
#slide-a-3:checked ~ nav > label:nth-child(9),
#slide-a-4:checked ~ nav > label:nth-child(10),
#slide-a-5:checked ~ nav > label:nth-child(6),
#slide-b-1:checked ~ nav > label:nth-child(2),
#slide-b-2:checked ~ nav > label:nth-child(3),
#slide-b-3:checked ~ nav > label:nth-child(4),
#slide-b-4:checked ~ nav > label:nth-child(5),
#slide-b-5:checked ~ nav > label:nth-child(1) {
animation: bg 10s ease infinite;
}
#slide-a-1:checked ~ nav > label:nth-child(8),
#slide-a-2:checked ~ nav > label:nth-child(9),
#slide-a-3:checked ~ nav > label:nth-child(10),
#slide-a-4:checked ~ nav > label:nth-child(6),
#slide-a-5:checked ~ nav > label:nth-child(7),
#slide-b-1:checked ~ nav > label:nth-child(3),
#slide-b-2:checked ~ nav > label:nth-child(4),
#slide-b-3:checked ~ nav > label:nth-child(5),
#slide-b-4:checked ~ nav > label:nth-child(1),
#slide-b-5:checked ~ nav > label:nth-child(2) {
animation: bg 10s ease infinite 2s;
}
#slide-a-1:checked ~ nav > label:nth-child(9),
#slide-a-2:checked ~ nav > label:nth-child(10),
#slide-a-3:checked ~ nav > label:nth-child(6),
#slide-a-4:checked ~ nav > label:nth-child(7),
#slide-a-5:checked ~ nav > label:nth-child(8),
#slide-b-1:checked ~ nav > label:nth-child(4),
#slide-b-2:checked ~ nav > label:nth-child(5),
#slide-b-3:checked ~ nav > label:nth-child(1),
#slide-b-4:checked ~ nav > label:nth-child(2),
#slide-b-5:checked ~ nav > label:nth-child(3) {
animation: bg 10s ease infinite 4s;
}
#slide-a-1:checked ~ nav > label:nth-child(10),
#slide-a-2:checked ~ nav > label:nth-child(6),
#slide-a-3:checked ~ nav > label:nth-child(7),
#slide-a-4:checked ~ nav > label:nth-child(8),
#slide-a-5:checked ~ nav > label:nth-child(9),
#slide-b-1:checked ~ nav > label:nth-child(5),
#slide-b-2:checked ~ nav > label:nth-child(1),
#slide-b-3:checked ~ nav > label:nth-child(2),
#slide-b-4:checked ~ nav > label:nth-child(3),
#slide-b-5:checked ~ nav label:nth-child(4) {
animation: bg 10s ease infinite 6s;
}
@keyframes bg-1 {
0%,21%,100% {
background: #ccc;
}
0%,20% {
background: #333;
}
}
@keyframes bg {
0%,19%,41%,100% {
background: #ccc;
}
20%,40% {
background: #333;
}
}
@keyframes opacity-0 {
0%,20%,80%,100% {
opacity: 1;
}
20%,80% {
opacity: 0;
}
}
</style>


链接: https://fly63.com/course/33_1585