js实心三维可交互相册效果代码
代码语言:html
所属分类:画廊相册
代码描述:js实心三维可交互相册效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
perspective: 800px;
overflow: hidden;
display: grid;
place-items: center;
background: linear-gradient(#3a4149, #111722);
}
main {
position: relative;
transform-style: preserve-3d;
width: 50vmin;
height: 75vmin;
transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
}
img {
width: 100%;
height: 100%;
object-fit: cover;
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
article {
position: absolute;
inset: 0;
-webkit-box-reflect: below 50px linear-gradient(transparent, rgba(255, 255, 255, 0.15));
}
article button {
border: 0;
outline: 0;
cursor: pointer;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: 5%;
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
article button:focus-visible {
box-shadow: 0 0 0 3px cyan;
}
article button:focus {
box-shadow: 0 0 0 3px cyan;
}
article button:focus:not(:focus-visible) {
box-shadow: none;
}
article button:hover,
article button:hover img, article button:focus,
article button:focus im.........完整代码请登录后点击上方下载按钮下载查看
网友评论0