js实现图文幻灯片切换效果代码
代码语言:html
所属分类:幻灯片
代码描述:js实现图文幻灯片切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
.articles {
display: grid;
padding: 1.2em 1.6em;
color: white;
border-radius: 1em;
background-color: white;
grid-template-columns: 300px 1fr;
gap: 2rem;
}
.articles nav {
grid-column: 1/-1;
display: flex;
gap: 1ch;
justify-content: center;
grid-row: 1;
}
.articles nav button {
background: grey;
color: white;
padding: 0.5rem 1rem;
cursor: pointer;
width: 100%;
text-align: center;
border-radius: 0.5ch;
}
.articles nav button:hover {
background: black;
}
.articles article {
display: contents;
}
.articles article:nth-of-type(1) picture {
background-color: red;
}
.articles article:nth-of-type(1) picture::after {
content: "1";
}
.articles article:nth-of-type(2) picture {
background-color: blue;
}
.articles article:nth-of-type(2) picture::after {
content: "2";
}
.articles article:nth-of-type(3) picture {
ba.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0