jquery+css实现自适应相册点击图片放大效果代码

代码语言:html

所属分类:画廊相册

代码描述:jquery+css实现自适应相册点击图片放大效果代码

代码标签: jquery 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/reset.min.css">
  
<style>
*, *::before, *::after {
	 box-sizing: border-box;
}
 img {
	 display: block;
}
 .gallery {
	 position: relative;
	 z-index: 2;
	 padding: 10px;
	 display: flex;
	 flex-flow: row wrap;
	 justify-content: space-between;
	 transition: all 0.5s ease-in-out;
	 transform: translateZ(0);
}
 .gallery.pop {
	 filter: blur(10px);
}
 .gallery figure {
	 flex-basis: 33.333%;
	 padding: 10px;
	 overflow: hidden;
	 cursor: pointer;
}
 .gallery figure img {
	 width: 100%;
	 transition: all 0.3s ease-in-out;
}
 .gallery figure figcaption {
	 display: none;
}
 .popup {
	 position: fixed;
	 z-index: 2;
	 top: 0;
	 left: 0;
	 width: 100%;
	 height: 100vh;
	 background: #fff;
	 opacity: 0;
	 transition: opacity 0.5s ease-in-out 0.2s;
}
 .popup.pop {
	 opacity: 1;
	 transition: opacity 0.2s ease-in-out 0s;
}
 .popup.pop figure {
	 margin-top: 0;
	 opacity: 1;
}
 .popup figure {
	 position: absolute;
	 top: 50%;
	 left: 50%;
	 transform: translate(-50%, -50%);
	 transform-origin: 0 0;
	 margin-top: 30px;
	 opacity: 0;
	 animation: poppy 500ms linear both;
}
 .popup figure img {
	 position: relative;
	 z-index: 2;
}
 .popup figure figcaption {
	 position: absolute;
	 bottom: 50px;
	 background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
	 z-index: 2;
	 width: 100%;
	 padding: 100px 20px 20px 20px;
	 color: #fff;
	 font-family: 'Open Sans', sans-serif;
	 font-size: 32px;
}
 .popup figure figcaption small {
	 font-size: 11px;
	 display: block;
	 text-transform: uppercase;
	 margin-top: 12px;
	 text-indent: 3px;
	 opacity: 0.7;
	 letter-spacing: 1px;
}
 .popup figure .shadow {
	 position: relative;
	 z-index: 1;
	 top: -56px;
	 margin: 0 auto;
	 background-position: center bottom;
	 background-repeat: no-repeat;
	 width: 98%;
	 height: 50px;
	 opacity: 0.9;
	 filter: blur(16px) contrast(1.5);
	 tran.........完整代码请登录后点击上方下载按钮下载查看

网友评论0