Add pantalla juego
This commit is contained in:
+119
@@ -0,0 +1,119 @@
|
|||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100vh;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Área de la Pregunta */
|
||||||
|
.question-container {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
||||||
|
padding: 30px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cuadrícula de Respuestas */
|
||||||
|
.answers-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 15px;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Botones de Respuesta Básicos */
|
||||||
|
.btn-answer {
|
||||||
|
border: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
color: white;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.1s ease, filter 0.1s ease;
|
||||||
|
box-shadow: 0 6px 0 rgba(0,0,0,0.2);
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-answer:active {
|
||||||
|
transform: translateY(4px);
|
||||||
|
box-shadow: 0 2px 0 rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Variaciones de Color y Formas */
|
||||||
|
.red {
|
||||||
|
background-color: #e21b3c;
|
||||||
|
}
|
||||||
|
.red:hover { filter: brightness(1.1); }
|
||||||
|
|
||||||
|
.blue {
|
||||||
|
background-color: #1368ce;
|
||||||
|
}
|
||||||
|
.blue:hover { filter: brightness(1.1); }
|
||||||
|
|
||||||
|
.yellow {
|
||||||
|
background-color: #d89e00;
|
||||||
|
}
|
||||||
|
.yellow:hover { filter: brightness(1.1); }
|
||||||
|
|
||||||
|
.green {
|
||||||
|
background-color: #26890c;
|
||||||
|
}
|
||||||
|
.green:hover { filter: brightness(1.1); }
|
||||||
|
|
||||||
|
/* Iconos Geométricos Simulados con CSS */
|
||||||
|
.shape {
|
||||||
|
display: inline-block;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
margin-right: 20px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.triangle {
|
||||||
|
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.diamond {
|
||||||
|
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.square {
|
||||||
|
/* Por defecto es un cuadrado */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Adaptabilidad para Móviles */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.answers-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.question-container {
|
||||||
|
font-size: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.btn-answer {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||||
|
<title>Proyecto Trivial</title>
|
||||||
|
<link rel="stylesheet" href="css/juego.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Contenedor de la Pregunta -->
|
||||||
|
<div class="question-container">
|
||||||
|
¿Cuál es el planeta más grande de nuestro sistema solar?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Contenedor de Respuestas (Estilo Kahoot) -->
|
||||||
|
<div class="answers-grid">
|
||||||
|
<button class="btn-answer red" onclick="checkAnswer('Marte')">
|
||||||
|
<span class="shape triangle"></span>
|
||||||
|
Marte
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button class="btn-answer blue" onclick="checkAnswer('Júpiter')">
|
||||||
|
<span class="shape diamond"></span>
|
||||||
|
Júpiter
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button class="btn-answer yellow" onclick="checkAnswer('Saturno')">
|
||||||
|
<span class="shape circle"></span>
|
||||||
|
Saturno
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button class="btn-answer green" onclick="checkAnswer('Tierra')">
|
||||||
|
<span class="shape square"></span>
|
||||||
|
Tierra
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user