SHOWING: First 60
#70,445,138textbody {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #000;
}
#frame {
width: 550px;
height: 550px;
perspective: 1000px;
}
#17,350,177text#17,350,176jsbody,html { height: 100%; margin: 0; overflow: hidden;background-color: #111;}.container {width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;perspective: 1000px;}.cube {width: 200px;height: 200px;position: relative;transform-style: preserve-3d;animation: spin 20s infinite linear; }.cube div {width: 200px;height: 200px;position: absolute;opacity: 0.8;border-radius: 10px;transition: transform 0.5s ease;}.cube .front {transform: translateZ(100px);}.cube .back {transform: translateZ(-100px) rotateY(180deg);}.cube .right {transform: translateX(100px) rotateY(90deg);}.cube .left {transform: translateX(-100px) rotateY(-90deg);}.cube .top {transform: translateY(-100px) rotateX(90deg);}.cube .bottom {transform: translateY(100px) rotateX(-90deg);}.cube:hover div {opacity: 1;transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);}@keyframes spin {0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);}100% {transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);}}
#16,632,029text#16,632,028js<!DOCTYPE html>
<html>
<head>
<title>Pattern Drawing</title>
<style>
/* Set the background color of the body to yellow */
body {
background-color: yellow;
margin: 0;
}
/* Center the frame */
#container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: white; /* Set the background color of the frame to white */
}
/* Define the size and style of the frame */
#frame {
width: 400px;
height: 400px;
border: 2px solid #555;
position: relative;
overflow: hidden;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
border-radius: 8px;
}
/* Define the style of the pattern */
.pattern {
position: absolute;
background-color: #2c3e50;
opacity: 0.8;
transform: skew(20deg);
transform-origin: top left;
transition: all 0.3s ease-in-out;
}
</style>
</head>
<body>
<div id="container">
<div id="frame"></div>
</div>
<script>
// Generate a random color and create wave-like patterns with delay
function getRandomColor() {
var letters = "0123456789ABCDEF";
var color = "#";
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
function createPattern() {
var frame = document.getElementById("frame");
var frameWidth = frame.offsetWidth;
var frameHeight = frame.offsetHeight;
var delay = 100; // Delay between each pattern creation (in milliseconds)
var count = 0; // Counter to keep track of patterns created
var interval = setInterval(function() {
var pattern = document.createElement("div");
pattern.classList.add("pattern");
pattern.style.width = Math.floor(Math.random() * 100) + "px";
pattern.style.height = Math.floor(Math.random() * 100) + "px";
pattern.style.backgroundColor = getRandomColor();
pattern.style.top = Math.floor(Math.random() * (frameHeight - 100)) + "px";
pattern.style.left = Math.floor(Math.random() * (frameWidth - 100)) + "px";
frame.appendChild(pattern);
// Trigger reflow to apply the initial transition
pattern.offsetWidth;
pattern.style.transform = "skew(0deg)"; // Reset the skew transformation
count++;
if (count === 50) {
clearInterval(interval); // Stop the pattern generation after 50 patterns
}
}, delay);
}
createPattern();
</script>
</body>
</html>#15,819,970text