vue实现带下条缩略图效果的幻灯片轮换效果代码
代码语言:html
所属分类:幻灯片
代码描述:vue实现带下条缩略图效果的幻灯片轮换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--color--primary: hsl(0, 0%, 100%);
--color--secondary: hsl(0, 0%, 90%);
--color--neutral: hsl(0, 0%, 1%);
--color--background: hsl(300, 3%, 15%);
}
html {
font-family: "Inter", sans-serif;
font-size: calc(95vmin / 100);
}
@supports (font-variation-settings: normal) {
html {
font-family: "Inter var", sans-serif;
}
}
body {
display: grid;
min-height: 100vh;
background: var(--color--background);
place-items: center;
}
.viewport {
position: relative;
display: grid;
grid-template-columns: 1fr 30rem;
width: 95vmin;
height: calc(95rem * (9 / 16));
background: var(--color--primary);
box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
overflow: hidden;
}
.nav {
position: absolute;
z-index: 1;
top: 0;
right: 0;
left: 0;
display: grid;
grid-auto-flow: column;
-webkit-box-pack: justify;
justify-content: space-between;
padding: 5rem;
}
.nav-enter, .nav-leave-to {
-webkit-transform: translateY(-2rem);
transform: translateY(-2rem);
opacity: 0;
}
.nav-enter-active, .nav-leave-active {
-webkit-transition: all 300ms;
transition: all 300ms;
}
.nav__brand {
width: 3rem;
fill: var(--color--primary);
}
.nav__list {
display: grid;
grid-auto-flow: column;
grid-gap: 15rem;
-webkit-box-pack: justify;
justify-content: space-between;
padding: 0;
color: var(--color--neutral);
}
.nav__list-item {
font-weight: 730;
}
.nav__list-item svg {
width: 1rem;
fill: var(--color--neutral);
}
.nav__list-item-link {
text-decoration: none;
}
.nav__list-item-link:hover, .nav__list-item-link:focus {
text-decoration: underline;
}
.nav__list-item-link:visited {
color: var(--color--neutral);
}
.main {
display: grid;
grid-template-rows: 2fr 1fr;
grid-template-areas: "headline" "nav";
-webkit-box-align: end;
align-items: end;
}
.main a {
font-weight: 730;
text-decoration: none;
color: var(--color--primary);
}
.main a:hover, .main a:focus {
text-decoration: underline;
}
.main__slider {
position: absolute;
z-index: 0;
top: 0;
left: 0;
overflow: hidden;
width: 70rem;
height: 100%;
-webkit-transition: background 200ms;
transition: background 200ms;
background: var(--color--background);
background: var(--accent);
-webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.main__slider:before {
position: absolute;
z-index: 1;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: block;
content.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0