js+css实现图文卡片介绍选手物品参数的幻灯片轮播效果代码

代码语言:html

所属分类:幻灯片

代码描述:js+css实现图文卡片介绍选手物品参数的幻灯片轮播效果代码

代码标签: js css 图文 卡片 介绍 选手 物品 参数 幻灯片 轮播

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

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

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

  
  
  
<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #2c3e50;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.slider-container {
  position: relative;
  width: 600px;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  background: #4a90e2;
}

.color-overlay {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #e94b4b;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
}

.color-overlay.slide-down {
  transform: translateY(100%);
}

.content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  z-index: 5;
}

.product-name {
  font-size: 48px;
  font-weight: bold;
  color: white;
  text-align: center;
  margin: 20px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  position: relative;
  margin-top: -2px;
  gap: 70px;
}

.word-part {
  transition: transform 0.8s ease-out;
  display: inline-block;
}

.milkshake-image {
  width: 400px;
  height: 300px;
  margin: 5px 0;
  object-fit: contain;
  transition: opacity 1.5s ease;
  position: relative;
  z-index: 5;
  position: absolute;
}

.nutrition-panel {
  background: white;
  border-radius: 15px;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 19px;
  margin-top: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0