原生js实现全屏幻灯片效果

代码语言:html

所属分类:幻灯片

代码描述:原生js实现全屏幻灯片效果,无需依赖其他js框架和库

代码标签: 全屏 幻灯片 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
/* RESET RULES & HELPER CLASSES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: transparent;
  border: none;
  outline: none;
}

body {
  font: 20px/28px sans-serif;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.cover {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  height: 100vh;
}


/* SLIDESHOW
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.slideshow {
  cursor: none;
}

.slideshow .slides {
  display: grid;
}

.slideshow .slide {
  grid-colu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0