js+css实现全屏圈圈式图文幻灯片切换效果代码
代码语言:html
所属分类:幻灯片
代码描述:js+css实现全屏圈圈式图文幻灯片切换效果代码,点击右下角的随机按钮进行切换。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Literata:opsz,wght@7..72,200&display=swap");
:root {
--img-current: url(//repo.bfw.wiki/bfwrepo/image/5e83e2a63bb7a.png);
--img-next: url(//repo.bfw.wiki/bfwrepo/image/64a4cd81c7470.png);
--text-current-title: "Sahara";
--text-next-title: "Maldives";
--text-current-subtitle: "Marrakech";
--text-next-subtitle: "Indian Ocean";
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: sans-serif;
text-transform: uppercase;
font-weight: 700;
font-size: clamp(0.7rem, 1vw, 0.8rem);
color: #fff;
}
a {
color: inherit;
text-decoration: none;
}
header,
footer {
position: fixed;
z-index: 50;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
header > *,
footer > * {
flex: 1 1 100%;
padding: 2rem;
}
header {
top: 0;
}
footer {
bottom: 0;
}
header > *:nth-child(2),
footer > *:nth-child(2) {
text-align: center;
}
header > *:nth-child(3),
footer > *:nth-child(3) {
text-align: right;
}
main {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
}
h1,
h2 {
display: block;
text-wrap: nowrap;
margin: 0;
overflow: hidden;
clip-path: inset(0 0 0 0);
}
h1::before,
h2::before {
transition-delay: 0.5s;
transform: translate(-50%, 0%);
}
h1 {
font-family: "Literata";
font-weight: 200;
height: clamp(2rem, 8vw, 4rem);
font-siz.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0