css+radio实现带缩略图倒影图片幻灯片代码
代码语言:html
所属分类:幻灯片
代码描述:css+radio实现带缩略图倒影图片幻灯片代码
代码标签: css radio 缩略图 倒影 图片 幻灯片 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--bg: url(https://fastly.picsum.photos/id/961/1200/600.jpg?hmac=-7W-CrsQiPQzXpAvw0MT_xSZFAEukp4QXrfSYZrseig);
}
body {
margin: 0;
padding: 0;
background: #2196f360;
background: #000;
}
body .thumbs {
position: absolute;
z-index: 20000000000000000000;
bottom: 2vmin;
width: 90vw;
text-align: center;
left: 5vw;
display: flex;
justify-content: center;
gap: 6px;
}
body .thumbs label {
border: 1px solid #fff8;
border-radius: 5px;
min-width: 10vmin;
aspect-ratio: 4/3;
display: inline-flex;
background-size: cover;
background-position: center top;
background-repeat: no-repeat;
box-sizing: border-box;
cursor: pointer;
opacity: 1;
position: relative;
}
body .thumbs label:hover {
opacity: 0.8;
box-shadow: 0 0 0 2px #fff;
}
body .thumbs label::before {
content: "";
position: absolute;
width: 17px;
height: 17px;
border-radius: 100%;
background: #5387b0;
top: 4px;
right: 4px;
border: 1px solid #fff9;
}
body .thumbs label input {
position: absolute;
z-index: -1;
opacity: 0;
}
body .thumbs label:has(input:checked) {
box-shadow: 0 0 0 3px #fff;
transition: all 0.25s ease 0s;
opacity: 1 !important;
}
body .thumbs label:has(inpu.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0