gsap Flip实现相册图片排列点击放大动画效果代码
代码语言:html
所属分类:图片放大
代码描述:gsap Flip实现一个相册图片排列,鼠标点击后放大动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import 'https://fonts.googleapis.com/css?family=Lato:300,400,700';
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
body {
display: grid;
align-items: center;
justify-items: center;
background: #1D1F20;
color: white;
font-size: 14px;
font-family: Lato, sans-serif;
}
img {
width: 100%;
}
.app {
height: 90vmin;
width: 90vmin;
background: white;
position: relative;
overflow: auto;
/* Hide the app on load */
visibility: hidden;
}
.gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2% 3.6%;
padding: 10px;
}
.item {
cursor: pointer;
font-size: 0;
}
.detail {
position: fixed;
top: 10px;
left: 50%;
width: 90.1vmin;
cursor: pointer;
font-size: 0;
display: flex;
flex-direction: column;
visibility: hidden;
max-height: 100%;
overflow: auto;
}
.detail > img {
position: relative;
z-index: 1;
}
.detail .content {
background: #232323;
padding: 2rem 1.5rem;
font-size: 1rem;
box-sizing: border-box;
flex-grow: 1;
}
.detail .content > * {
margin-bottom: 1rem;
}
.detail .title {
font-size: 2rem;
text-transform: uppercase;
}
.detail .secondary {
color: lightgray;
}
.detail .description {
line-height: 1.5;
}
</style>
</head>
<body>
<div class="app">
<div cl.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0