js实现上下折叠翻转图片幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述:js实现上下折叠翻转图片幻灯片效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel="preload" href="//repo.bfw.wiki/random/600x1000/景色?ran=1" />
<style>
* {
box-sizing: border-box;
}
body {
min-height: 100svh;
display: grid;
place-content: center;
background: black;
font-family: system-ui;
margin: 0;
}
.gallery {
--gallery-bg-color: rgba(255 255 255 / 0.075);
--gallery-border-color: rgba(255 255 255 / 0.25);
--gallery-padding: 0.5rem;
--gallery-width: 240px;
--gallery-height: 400px;
--gallery-perspective: 800px;
--gallery-divider-height: 4px;
position: relative;
background-color: var(--gallery-bg-color);
border: 1px solid var(--gallery-border-color);
padding: var(--gallery-padding);
}
@media (600px < width) {
.gallery {
--gallery-width: 300px;
--gallery-height: 500px;
}
}
.flip-gallery {
position: relative;
width: var(--gallery-width);
height: var(--gallery-height);
text-align: center;
perspective: var(--gallery-perspective);
}
/* image title/author with transition */
.flip-gallery::before {
content: attr(data-title);
color: rgba(255 255 255 / 0.75);
font-size: 0.75rem;
left: calc(var(--gallery-padding) * -1);
position: absolute;
top: calc(100% + calc(var(--gallery-padding) * 2));
line-height: 2;
opaci.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0