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-imageurl(resources/s4.jpg);
        }
        .wrape{
            margin-top150px;
            perspective1000px;
            perspective-origin:50% 50% ;
        }
        .cube{
            transform-style:preserve-3d;
            width200px;
            height200px;
            margin-top:20%;
            margin-left50%;
            positionrelative;
        }

        .cube video{
            positionabsolute;
            opacity0.8;
        }

        .cube video:nth-child(1){
            transformrotateY(0degtranslateZ(450px);
        }

        
        .cube video:nth-child(2){
            transformrotateY(90degtranslateZ(450px);
        }
        
        .cube video:nth-child(3){
            transformrotateY(180degtranslateZ(450px);
        }

        
        .cube video:nth-child(4){
            transformrotateY(-90degtranslateZ(340px);
        }

        
        .cube video:nth-child(5){
            transformrotateX(90degtranslateZ(450px);
        }
        
        .cube video:nth-child(6){
            transformrotateX(-90degtranslateZ(523px);
        }

        @keyframes loop {
            from{transformrotateX(0degrotateY(0deg);}
            to{transformrotateX(360degrotateY(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

Popular Posts