Calculator Tools Calculator Tools
Create

Pop It Eletrônico

Jan 4, 2024

About this app

An electronic version of the popular Pop It toy

Pop It Eletrônico

Related apps

Put this on your site

Source

                    <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Pop It Eletrônico</title>
<meta name="description" content="An electronic version of the popular Pop It toy">
<meta name="keywords" content="pop it, electronic, toy">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Generate random colors for the circles, squares, and triangles
const colors = ["#FF6384", "#36A2EB", "#FFCE56", "#4BC0C0", "#9966FF", "#FF9F40"];
const shapes = document.querySelectorAll(".shape");

shapes.forEach(function(shape) {
const randomColor = colors[Math.floor(Math.random() * colors.length)];
shape.style.backgroundColor = randomColor;
});
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
font-family: 'Roboto', sans-serif;
background-color: #f5f5f5;
}

.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.shape {
width: 200px;
height: 200px;
border-radius: 50%;
margin: 20px;
display: flex;
justify-content: center;
align-items: center;
font-size: 48px;
color: white;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
cursor: pointer;
transition: transform 0.3s ease;
}

.shape:hover {
transform: scale(1.1);
}

.circle {
background-color: #FF6384;
}

.square {
background-color: #36A2EB;
}

.triangle {
background-color: #FFCE56;
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
</style>
</head>
<body>
<div id="main-container" class="container">
<div class="shape circle">
<i class="fa fa-circle"></i>
</div>
<div class="shape square">
<i class="fa fa-square"></i>
</div>
<div class="shape triangle">
<i class="fa fa-caret-up"></i>
</div>
</div>
</body>
</html>