HTML+CSS Small project-5
3D transform design:-
HTML+CSS CODE:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
background-image: url(resources/s4.jpg);
}
.wrape{
margin-top: 150px;
perspective: 1000px;
perspective-origin:50% 50% ;
}
.cube{
transform-style:preserve-3d;
width: 200px;
height: 200px;
margin-top:20%;
margin-left: 50%;
position: relative;
}
.cube video{
position: absolute;
opacity: 0.8;
}
.cube video:nth-child(1){
transform: rotateY(0deg) translateZ(450px);
}
.cube video:nth-child(2){
transform: rotateY(90deg) translateZ(450px);
}
.cube video:nth-child(3){
transform: rotateY(180deg) translateZ(450px);
}
.cube video:nth-child(4){
transform: rotateY(-90deg) translateZ(340px);
}
.cube video:nth-child(5){
transform: rotateX(90deg) translateZ(450px);
}
.cube video:nth-child(6){
transform: rotateX(-90deg) translateZ(523px);
}
@keyframes loop {
from{transform: rotateX(0deg) rotateY(0deg);}
to{transform: rotateX(360deg) rotateY(360deg);}
}
.cube{
animation:loop 10s linear infinite;
}
</style>
</head>
<body>
<div class="wrap">
<div class="cube">
<video src="resources/v1.mp4"></video>
<video src="resources/v2.mp4" autoplay></video>
<video src="resources/v3.mp4" autoplay></video>
<video src="resources/v4.mp4" autoplay></video>
<video src="resources/v5.mp4"></video>
<video src="resources/v6.mp4" autoplay></video>
</div>
</div>
</body>
</html>
OUTPUT:-
Comments
Post a Comment
Please do not enter any spam link in the comment box.