d4vbit

html_san_valentin

Jan 30th, 2026
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="es">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Para ti ❤️</title>
  7. <style>
  8. body {
  9. display: flex;
  10. justify-content: center;
  11. align-items: center;
  12. height: 100vh;
  13. margin: 0;
  14. background-color: #ffdde1; /* Color de fondo rosita */
  15. font-family: 'Arial', sans-serif;
  16. flex-direction: column;
  17. text-align: center;
  18. overflow: hidden; /* Para que no salgan barras de desplazamiento */
  19. position: relative; /* Necesario para posicionar el texto escondido */
  20. }
  21.  
  22. h1 {
  23. color: #d63384;
  24. font-size: 3rem;
  25. margin-bottom: 20px;
  26. }
  27.  
  28. .img-container img {
  29. width: 200px;
  30. border-radius: 15px;
  31. margin-bottom: 20px;
  32. }
  33.  
  34. .botones {
  35. display: center;
  36. gap: 20px;
  37. }
  38.  
  39. button {
  40. padding: 15px 30px;
  41. font-size: 1.5rem;
  42. border: none;
  43. border-radius: 50px;
  44. cursor: pointer;
  45. transition: transform 0.2s;
  46. font-weight: bold;
  47. }
  48.  
  49. #btnSi {
  50. background-color: #28a745;
  51. color: white;
  52. box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
  53. }
  54.  
  55. #btnSi:hover {
  56. transform: scale(1.1);
  57. }
  58.  
  59. #btnNo {
  60. background-color: #dc3545;
  61. color: white;
  62. position: relative; /* Importante para que se mueva */
  63. }
  64.  
  65. /* Clase para el mensaje final */
  66. .oculto {
  67. display: none;
  68. }
  69.  
  70. /* Estilo para el texto escondido */
  71. .letra-pequena {
  72. position: absolute;
  73. bottom: 20px;
  74. font-size: 1rem;
  75. color: #d63384;
  76. opacity: 0.6; /* Un poco transparente para que se vea sutil */
  77. font-style: italic;
  78. pointer-events: none; /* Para que no moleste al hacer clic */
  79. }
  80. </style>
  81. </head>
  82. <body>
  83.  
  84. <div id="pantalla-pregunta">
  85. <div class="img-container">
  86. <img src="https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExN2dtNnNlMDZ2M3NrNmdxNWgyaWZ6eTJvZnMxcmN5N2FmdWhoNWE4bCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/y93x7gLXTO5dnSWCEI/giphy.gif" alt="Please">
  87. </div>
  88. <h1>Quieres ser mi san valentin?</h1>
  89. <div class="botones">
  90. <button id="btnSi" onclick="aceptar()">¡SÍ, OBVIO!</button>
  91. <button id="btnNo" onmouseover="moverBoton()" onclick="moverBoton()">NO</button>
  92. </div>
  93. </div>
  94.  
  95. <div id="pantalla-final" class="oculto">
  96. <div class="img-container">
  97. <img src="https://media.giphy.com/media/TdfyKrN7HGTIY/giphy.gif" alt="Celebracion">
  98. </div>
  99. <h1>GRACIAS POR SER TAN SINCERA ❤️</h1>
  100. </div>
  101.  
  102. <div class="letra-pequena">
  103. ⚠️ Test claramente no manipulado (100% origen cientifico) ⚠️
  104. </div>
  105.  
  106. <script>
  107. function moverBoton() {
  108. const btnNo = document.getElementById('btnNo');
  109. // Ancho y alto de la ventana
  110. const anchoVentana = window.innerWidth;
  111. const altoVentana = window.innerHeight;
  112.  
  113. // Generar posiciones aleatorias
  114. const nuevoX = Math.random() * (anchoVentana - 150); // Restamos el tamaño del botón aprox
  115. const nuevoY = Math.random() * (altoVentana - 150);
  116.  
  117. // Aplicar las nuevas posiciones
  118. btnNo.style.position = 'absolute';
  119. btnNo.style.left = nuevoX + 'px';
  120. btnNo.style.top = nuevoY + 'px';
  121. }
  122.  
  123. function aceptar() {
  124. document.getElementById('pantalla-pregunta').style.display = 'none';
  125. document.getElementById('pantalla-final').style.display = 'flex';
  126. document.getElementById('pantalla-final').classList.remove('oculto');
  127. }
  128. </script>
  129. </body>
  130. </html>
Add Comment
Please, Sign In to add comment