三维盒子图片悬浮拆分立体效果
代码语言:html
所属分类:三维
代码描述:三维盒子图片悬浮拆分立体效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
}
.parentBox {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
background-color: #000000;
perspective:500px;
/* background-color: #fff; */
}
.box {
transform-style:preserve-3d;
width: 300px;
height: 300px;
position: relative;
/* background-color: pink; */
animation: run 10s infinite;
z-index: 999;
}
.box1 {
position: absolute;
top: 50%;
left: 50%;
width: 280px;
height: 280px;
/* background-color: pink; */
transform: translate(-50%, -50%);
transform-style:preserve-3d;
/* animation: run 10s infinite; */
}
@keyframes run {
0% {
transform:rotateY(0);
}
20% {
transform.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0