js+css实现图文人物介绍幻灯片效果代码

代码语言:html

所属分类:幻灯片

代码描述:js+css实现图文人物介绍幻灯片效果代码,点击人物图片进行切换,还可通过视频文字进行介绍。

代码标签: js css 图文 人物 介绍 幻灯片

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1">


<!-- Fonts-->
<link href="https://fonts.googleapis.com/css?family=Atma" rel="stylesheet">

<link href="https://fonts.googleapis.com/css?family=Open+Sans|Open+Sans+Condensed:300" rel="stylesheet">

  
<style>
*,
*::after,
*::before {
  box-sizing: border-box;
}
@font-face {
  font-family: "font";
  src: url("//repo.bfw.wiki/bfwrepo/font/OakesGrotesk-Semi-Bold.woff2");
  src: url("//repo.bfw.wiki/bfwrepo/font/OakesGrotesk-Semi-Bold.woff");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "font-2";
  src: url("//repo.bfw.wiki/bfwrepo/font/MaisonNeue-Book.woff2");
  src: url("//repo.bfw.wiki/bfwrepo/font/MaisonNeue-Book.woff");
  font-weight: normal;
  font-style: normal;
}
body {
  font-family: 'Open Sans Condensed', sans-serif;
  min-height: 100vh;
  color: #fff8dc;
  background-color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 10em;
  font-size: 14px;
  overflow: hidden;
}
@media screen and (min-width: 320px) {
  body {
    font-size: calc(14px + 6 * ((100vw - 320px) / 960));
  }
}
@media screen and (min-width: 1280px) {
  body {
    font-size: 20px;
  }
}
/* Page Loader */
.loading {
  background: #000;
  z-index: 200;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.js .loading::before {
  content: '';
  position: fixed;
  z-index: 4;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
}
.js .loading::after {
  content: '';
  position: fixed;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.4;
  background: rgba(255,99,71,0.6);
  -webkit-animation: loaderAnim 0.7s linear infinite alternate forwards;
          animation: loaderAnim 0.7s linear infinite alternate forwards;
}
a {
  text-decoration: none;
  color: rgba(255,99,71,0.6);
  outline: none;
}
a:hover,
a:focus {
  color: #ff4500;
  outline: none;
}
.cit {
  color: #cca700 !important;
  font-style: italic;
}
.cit:before {
  content: '« ';
}
.cit:after {
  content: ' »';
}
.orangered {
  color: #ff4500;
}
.gold {
  color: #cca700;
}
.hidden {
  position: absolute;
  overflow: hidden;
  width: 0;
  height: 0;
  pointer-events: none;
}
.message {
  position: relative;
  z-index: 1;
  display: none;
  padding: 1em;
  text-align: center;
  color: #000;
  background: #fff8dc;
}
/* Icons */
.icon {
  display: block;
  width: 1.5em;
  height: 1.5em;
  margin: 0 auto;
  fill: currentColor;
}
.frame {
  position: fixed;
  z-index: 3;
  top: 2vh;
  left: 0;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 90vh;
  padding: 1em;
  pointer-events: none;
}
.frame a {
  pointer-events: auto;
}
/* Header */
.header {
  position: relative;
  z-index: 1;
  margin-left: 31vw;
  transform: translateX(-50%);
  margin-top: -3vh;
  font-family: font;
  font-weight: 100;
}
.header__title {
  position: absolute;
  width: 150px;
  font-size: 1em;
  font-weight: normal;
  line-height: 1;
  color: $color--text;
  flex-wrap: wrap;
  align-items: top;
  padding: 0;
  display: flex;
  justify-content: flex;
  text-transform: uppercase;
  flex-wrap: wrap;
  align-items: top;
  padding: 0;
  letter-spacing: 0.3em;
}
.header__title:before {
  content: "What You Gonna Do When  the";
  letter-spacing: 0.1em;
  font-size: 1em;
}
.header__title:after {
  content: " de Roberto Minervini";
  letter-spacing: 0;
  opacity: 0.7;
  font-family: 'Open Sans Condensed', sans-serif;
  text-transform: none;
  font-size: 0.9em;
}
/* Top Navigation Style */
.icon {
  display: inline-block;
  padding: 0.25em;
  margin: 0.25em 0 0 0;
}
/* SLIDESHOW */
.slideshow {
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 100%;
  height: calc(100vh - 20vh);
  display: grid;
  grid-template-columns: 33% 33% 33%;
  grid-column-gap: 0.5%;
  grid-template-rows: 100%;
  grid-template-areas: '... slide ...';
}
.slide {
  width: 100%;
  display: flex;
  pointer-events: none;
  cursor: pointer;
  position: relative;
  height: 85vh;
  grid-area: slide;
}
.slideshow--previewopen .slide {
  cursor: default;
}
.slide--current {
  pointer-events: auto;
}
.slide__img-wrap {
  width: 100%;
  overflow: hidden;
  z-index: 1;
  height: 65%;
  top: 10%;
  position: absolute;
}
.slide__img-wrap .bg--5 {
  background-image: url("//repo.bfw.wiki/bfwrepo/image/5fb390d10ad81.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_770,h_420,/quality,q_90");
  background-position: 8% bottom;
}
.slideshow__deco {
  grid-area: slide;
  background: linear-gradient(#000, rgba(254,246,225,0.11));
  width: 100%;
  height: 56%;
  align-self: center;
  position: relative;
  margin: -4px 0 0 0;
  right: -3px;
}
.nav {
  position: absolute;
  background: none;
  width: 3em;
  height: 3em;
  z-index: 1;
  border: 0;
  padding: 0;
  margin: 0;
  pointer-events: none;
  transition: transform 0.8s opacity 0.8s;
  transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
}
.nav--next {
  bottom: 0;
  right: 0;
}
.icon--navarrow-next {
  transform: rotate(0deg);
}
.nav--prev {
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0