div+css+js实现室内墙壁上挂上一幅穿越时空动画的壁画效果代码
代码语言:html
所属分类:动画
代码描述:div+css+js实现室内墙壁上挂上一幅穿越时空动画的壁画效果代码,鼠标放上去试试有星际穿越动画出现。
代码标签: div css js 室内 墙壁 挂上 穿越 时空 动画 壁画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url(//fonts.googleapis.com/css?family=Open+Sans);
*, *::before, *::after {
margin: 0;
padding: 0;
border: 0;
box-sizing: border-box;
}
body {
overflow: hidden;
height: 100vh;
font-family: 'Open Sans', sans-serif;
font-size: 0.75rem;
}
a {
text-decoration: none;
color: #000000;
}
.gallery {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.gallery .ceiling-top {
width: 100%;
min-height: 1024px;
background-image: url("//repo.bfw.wiki/bfwrepo/images/wall/CeilingTop.png");
background-repeat: repeat;
background-position: left top;
}
.gallery .ceiling {
width: 100%;
min-height: 512px;
background-image: url("//repo.bfw.wiki/bfwrepo/images/wall/Ceiling.png");
background-repeat: repeat;
background-position: left bottom;
}
.gallery .wall {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
background-image: url("//repo.bfw.wiki/bfwrepo/images/wall/Wall.png");
background-repeat: repeat;
background-position: left top;
}
@media only screen and (max-height: 740px) {
.gallery .wall {
margin-top: -50px;
}
}
.gallery .wall .canvas-wrapper {
width: 40%;
height: 60%;
min-width: 512px;
min-height: 512px;
margin-top: 5px;
margin-bottom: 75px;
position: relative;
cursor: pointer;
}
@media only screen and (max-height: 930px) {
.gallery .wall .canvas-wrapper {
width: 40%;
height: 50%;
min-width: 312px;
min-height: 312px;
margin-top: 0px;
margin-bottom: 25px;
}
}
.gallery .wall .canvas-wrapper .passage {
position: absolute;
width: 512px;
height: calc(100% + 80px);
background-repeat: repeat;
background-position: left top;
margin-top: -5px;
}
@media only screen and (max-height: 930px) {
.gallery .wall .canvas-wrapper .passage {
height: calc(100% + 25px);
margin-top: 0px;
}
}
.gallery .wall .canvas-wrapper .passage.left {
background-image: url("//repo.bfw.wiki/bfwrepo/images/wall/PassageCenter.png");
left: -768px;
}
.gallery .wall .canvas-wrapper .passage.right {
background-image: url("//repo.bfw.wiki/bfwrepo/images/wall/PassageCenterRight.png");
right: -768px;
}
.gallery .wall .canvas-wrapper .passage .passage-wrapper {
position: relative;
height: 100%;
}
.gallery .wall .canvas-wrapper .passage .passage-wrapper .passage-top {
position: absolute;
width: 512px;
height: 512px;
background-repeat: repeat;
background-position: left top;
top: -512px;
}
.gallery .wall .canvas-wrapper .passage.left .passage-wrapper .passage-top {
background-image: url("//repo.bfw.wiki/bfwrepo/images/wall/PassageTop.png");
}
.gallery .wall .canvas-wrapper .passage.right .passage-wrapper .passage-top {
background-image: url("//repo.bfw.wiki/bfwrepo/images/wall/PassageTopRight.png");
}
.gallery .wall .canvas-wrapper .passage .passage-wrapper .passage-bottom {
position: absolute;
width: 512px;
height: 512px;
background-repeat: repeat;
background-position: left top;
bottom: -512px;
}
.gallery .wall .canvas-wrapper .passage.left .passage-wrapper .passage-bottom {
background-image: url(&q.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0