3D-box

Developer
Size
2,346 Kb
Views
30,360

How do I make an 3d-box?

Just move cursor and view box 3d movement and smile dance in middle of box...Design by : [email protected]. What is a 3d-box? How do you make a 3d-box? This script and codes were developed by Parth Viroja on 03 September 2022, Saturday.

3D-box Previews

3D-box - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>3D-box</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container"> <ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li class="gif"></li> </ul>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

3D-box - Script Codes CSS Codes

* { list-style-type: none;
}
body { background-color: #e13300;
}
#container { position: relative; display: block; -webkit-perspective: 1300; -moz-perspective: 1300px; -ms-perspective: 1300; perspective: 1300; -webkit-perspective-origin: 50% 50%; -moz-perspective-origin: 50% 50%; -ms-perspective-origin: 50% 50%; perspective-origin: 50% 50%; width: 100%; height: 250px; margin-top: 100px;
}
#container ul { position: relative; display: block; width: 250px; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transform-origin: 50% 50%; -moz-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; transform-origin: 50% 50%; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; transition: all 1s ease; margin: 0 auto;
}
#container ul li { position: absolute; height: 250px; width: 250px; padding: 0;
}
#container ul li:nth-child(1) { -webkit-transform: translateZ(125px); -moz-transform: translateZ(125px); -ms-transform: translateZ(125px); transform: translateZ(125px); -webkit-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -moz-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -ms-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -o-box-shadow: 0 0 50px rgba(255, 255, 255, 1); box-shadow: 0 0 100px rgba(255, 255, 255, 1);
}
#container ul li:nth-child(2) { -webkit-transform: rotateY(90deg) translateZ(125px); -moz-transform: rotateY(90deg) translateZ(125px); -ms-transform: rotateY(90deg) translateZ(125px); transform: rotateY(90deg) translateZ(125px); -webkit-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -moz-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -ms-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -o-box-shadow: 0 0 50px rgba(255, 255, 255, 1); box-shadow: 0 0 100px rgba(255, 255, 255, 1);
}
#container ul li:nth-child(3) { -webkit-transform: rotateY(180deg) translateZ(125px); -moz-transform: rotateY(180deg) translateZ(125px); -ms-transform: rotateY(180deg) translateZ(125px); transform: rotateY(180deg) translateZ(125px); -webkit-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -moz-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -ms-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -o-box-shadow: 0 0 50px rgba(255, 255, 255, 1); box-shadow: 0 0 100px rgba(255, 255, 255, 1);
}
#container ul li:nth-child(4) { -webkit-transform: rotateY(-90deg) translateZ(125px); -moz-transform: rotateY(-90deg) translateZ(125px); -ms-transform: rotateY(-90deg) translateZ(125px); transform: rotateY(-90deg) translateZ(125px); -webkit-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -moz-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -ms-box-shadow: 0 0 50px rgba(255, 255, 255, 1); -o-box-shadow: 0 0 50px rgba(255, 255, 255, 1); box-shadow: 0 0 100px rgba(255, 255, 255, 1);
}
#container ul li:nth-child(5) { -webkit-transform: rotateX(90deg) translateZ(125px);
}
#container ul li:nth-child(6) { -webkit-transform: rotateX(90deg) translateZ(-125px);
}
#container ul li:nth-child(7) { background-image: url(https://lh3.googleusercontent.com/epP6yl16cHX94_ZgAlf3xO2CTQWt6Xy-KfuvGfXGYnU=w255-h31-no); background-position: center center; background-repeat: no-repeat;
}

3D-box - Script Codes JS Codes

$(window).mousemove(function(event) { var w = $(this).width() / 2; var v = 0; if (event.pageX > w) { v = ((event.pageX - w) / 20); } else { v = ((event.pageX - w) / 20); } $("#container ul").css({ '-webkit-transform': 'rotateY(' + v + 'deg)', '-moz-transform': 'rotateY(' + v + 'deg)' });
});
3D-box - Script Codes
3D-box - Script Codes
Home Page Home
Developer Parth Viroja
Username parthviroja
Uploaded September 03, 2022
Rating 3
Size 2,346 Kb
Views 30,360
Do you need developer help for 3D-box?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Parth Viroja (parthviroja) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!