js+css实现相册照片堆叠可拖动移动效果代码

代码语言:html

所属分类:画廊相册

代码描述:js+css实现相册照片堆叠可拖动移动效果代码

代码标签: js css 相册 照片 堆叠 拖动 移动

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

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

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

 
 
<style>
@import url("https://fonts.googleapis.com/css2?family=Caveat");

.Container {
 
position: absolute;
 
top: 50%;
 
left: 50%;
}

.Picture {
 
display: inline-block;
 
position: absolute;
 
top: 0;
 
left: 0;
 
border: 5px solid #fff;
 
border-radius: 3px;
 
background: #fff;
 
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
 
transform: translate(-50%, -50%);
 
user-select: none;
 
cursor: pointer;
}

.Picture-img {
 
display: block;
 
width: 300px;
 
height: 300px;
 
pointer-events: none;
}

.Picture-note {
 
display: flex;
 
align-items: center;
 
justify-content: center;
 
width: 300px;
 
height: 70px;
 
padding: 12px 24px;
 
font-size: 1.5rem;
 
text-align: center;
}

.Network {
 
display: inline-block;
 
padding: 0 5px;
}

.Network img {
 
width: 1.5rem;
 
aspect-ratio: 1 / 1;
 
vertical-align: middle;
}

/* --------------------- */
/* Other styles          */
/* --------------------- */

* {
 
box-sizing: border-box;
}

body
{
 
margin: 0;
 
font-family: 'Caveat', serif;
 
overflow: hidden;
}
</style>


 
</head>

<body >
 
<div class="Container">
 
<!-- last card -->
 
<div class="Picture">
   
<img class="Picture-img" src="//repo.bfw.wiki/bfwrepo/image/60d41f5173b0d.png" alt="" />
   
<div class="Picture-note"><span>@hello you see  me </span></div>
 
</div>
 
<!-- other cards -->
 
<div class="Picture">
   
<img class="Picture-img" src="//repo.bfw.wiki/bfwrepo/image/61e27364c2151.png" alt="" />
   
<div class="Picture-note"><span>Over the clouds</span></div>
 
</div>
 
<div class="Picture">
   
<img class="Picture-img" src="//repo.bfw.wiki/bfwrepo/image/6257e9f53b418.png" alt="" />
   
<div class="Picture-note"><span>Golden Gate Bridge - San Francisco</span></div>
 
</div>
 
<div class="Picture">
    <img class="Pictur.........完整代码请登录后点击上方下载按钮下载查看

网友评论0