swiper实现歌手明星介绍及专辑歌曲点播滚动鼠标切换效果代码

代码语言:html

所属分类:幻灯片

代码描述:swiper实现歌手明星介绍及专辑歌曲点播切换效果代码,滚动鼠标切换明星,右侧可查看点播其歌曲,还有明星文字介绍。

代码标签: div css 方形 图片 悬浮 边框 动画

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

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

<head>
  <meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/swiper-bundle.10.3.1.css">
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Agbalumo&family=Kalam:wght@700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Nunito", sans-serif;
}

img {
  width: 100%;
}

ul {
  list-style-type: none;
}

html,
body {
  position: relative;
  height: 100vh;
  width: 100%;
  background-color: #040a22;
}

section {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100vh;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  position: relative;
  text-align: center;
  font-size: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #040a22;
}

.hero {
  position: absolute;
  bottom: 0;
  z-index: 5;
  width: 450px;
  filter: contrast(90%);
  pointer-events: none;
}

.title {
  position: absolute;
  top: 20%;
  left: 5%;
  /* font-family: "Agbalumo", cursive; */
  font-family: "Kalam", cursive;
  font-size: 5rem;
  color: #fff;
  transition-delay: 3s;
}

/* -------------------- */
/* BACKGROUND ANIMATION */

.gradient {
  width: 500px;
  height: 500px;
  filter: blur(50px);
  background-image: linear-gradient(#4ddc9e, #5b37eb, #f1307e);
  animation: rotate 10s cubic-bezier(0.8, 0.2, 0.2, 0.8) alternate infinite;
  border-radius: 30% 70% 70% 30%/30% 30% 70% 70%;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ----------- */
/* BOX STYLES */

.box-container {
  position: absolute;
  top: 13%;
  right: 6%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 40px;
}

.box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 250px;
  aspect-ratio: 3/2;
  border-radius: 20px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.095);
  box-shadow: inset 2.01px -2.01px 20px rgba(214, 214, 214, 0.17),
    inset -3.01333px 3.01333px 3.01333px rgba(255, 255, 255, 0.39);
  backdrop-filter: blur(70px);
  padding: 20px 20px 30px;
  z-index: 6;
}

.box-mobile {
  display: none;
}

.box h1 {
  position: relative;
  text-align: center;
  text-transform: uppercase;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.box h1::before {
  content: "";
  position: absolute;
  top: 95%;
  width: 100%;
  left: 0;
  height: 3px;
  border-radius: 5px;
  background: linear-gradient(
    89.7deg,
    #2b60bc 0%,
    #45329d 15%,
    #822f99 30%,
    #97174a 50%,
    #822f99 70%,
    #45329d 85%,
    #2b60bc 100%
  );
  background-size: 200% 100%;
  animation: line-animation 13s infinite linear;
}

@keyframes line-animation {
  from {
    background-position: 100%;
  }
  to {
    background-position: -100%;
  }
}

.box p {
  font-weight: 300;
  font-size: 0.8rem;
}

.songs,
.overview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.songs img {
  border-radius: 10px;
  margin: 8px 0 5px;
  aspect-ratio: 5/3;
  object-fit: cover;
}

.songs h3 {
  font-size: 1rem;
}

.overview p {
  text-align: start;
}

.more-btn {
  position: absolute;
  top: 93%;
  left: 42%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 220, 220, 0.7);
  backdrop-filter: blur(70px);
  -webkit-backdrop-filter: blur(70px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  padding: 5px;
  cursor: pointer;
  transform: rotate(0deg);
  transition: all 0.5s linear;
}

.more-btn:hover {
  background: rgba(220, 220, 220, 1);
  transform: rotate(360deg);
}

.more-btn-icon {
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0