jquery实现视频卡片拖拽更换效果代码

代码语言:html

所属分类:拖放

代码描述:jquery实现视频卡片拖拽更换效果代码

代码标签: 卡片 拖拽 更换 效果

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


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

<head>

  <meta charset="UTF-8">

  
<style>
@import url("https://fonts.googleapis.com/css?family=Questrial");
*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-size: 62.5%;
}

body {
  background: #eeeeee;
  overflow-x: hidden;
  font-family: "Questrial", "Helvetica Neue", Helvetica, sans-serif;
}

.elements {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 35rem;
  height: 51rem;
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0.5rem 1rem 3rem rgba(0, 0, 0, 0.7);
}

.container {
  position: relative;
  margin: 3rem auto 0;
  width: 32rem;
}

.slide {
  position: absolute;
  height: 31rem;
  width: 32rem;
  border-radius: 3px;
  cursor: -webkit-grab;
  cursor: grab;
  background-color: gray;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}
.slide1 {
  box-shadow: 0.2rem 0.2rem 2.5rem rgba(0, 0, 0, 0.7);
  background-image: url("//repo.bfw.wiki/bfwrepo/image/609636b3b27fe.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_640,h_360,/quality,q_90");
  background-size: 55rem;
}

#paris {
  margin-left: -15rem;
}

#italy, #prog {
  margin-left: 0rem;
}

#hongkong {
  margin-left: -10rem;
}

.index1 {
  z-index: 1;
}
.index2 {
  z-index: 2;
}
.index3 {
  z-index: 3;
}
.index4 {
  z-index: 4;
}

.description {
  position: absolute;
  top: 39rem;
  margin: auto 4.2rem;
  width: 26.6rem;
}
.description__line {
  position: absolute;
  top: 3.5rem;
  width: 100%;
  border-bottom: 1px solid #eeeeee;
}
.description__country, .description__text {
  position: absolute;
  will-change: transform, opacity;
  transform: translateZ(0);
  opacity: 1;
  transition.........完整代码请登录后点击上方下载按钮下载查看

网友评论0