soy muy nuevo en esto Mi problema aquí es que cuando miro mi css móvil desde localhost se ve bien, pero luego cuando se implementa (probé con heroku y github) se ve realmente raro. Y cuando cambio las cosas a valores extremos, parece que no pasa nada en el desplegado.
html:
<meta name="viewport" content="width=device-width, initial-scale=1.0">, Css:
@media (max-width: 600px) { @supports (display: grid){ .super-container { width: 100%;!important; max-width: 100%;!important; } .container { width: 90%;!important; max-width: 100%;!important; } .btn2 { margin-top: 20px; width: 30%; flex-direction: column-reverse; color: black; } }}
probado con y sin apoyo. Agregué "! importante" solo para probar si hace alguna diferencia. = no. comprobé que todos mis enlaces son https y no http en el html. Probé con dos teléfonos diferentes. Caché borrado. 3 navegadores diferentes (safari, google y el de samsung).
La versión de escritorio se ve bien.
Enlace al sitio: https://ascoolarobban.github.io/resumegame/
Volcados de pantalla:
Ok, encontré una solución, si alguien tiene este problema en el futuro... No es muy bonito, pero... Tomé el código localhost generado automáticamente y lo pegué en la parte inferior del cuerpo y ahora realmente funciona...
<script> (function() { var ws = new WebSocket('ws://' + window.location.host + '/jb-server-page?reloadServiceClientId=4'); ws.onmessage = function (msg) { if (msg.data === 'reload') { window.location.reload(); } if (msg.data.startsWith('update-css ')) { var messageId = msg.data.substring(11); var links = document.getElementsByTagName('link'); for (var i = 0; i < links.length; i++) { var link = links[i]; if (link.rel !== 'stylesheet') continue; var clonedLink = link.cloneNode(true); var newHref = link.href.replace(/(&|\?)jbUpdateLinksId=\d+/, "$1jbUpdateLinksId=" + messageId); if (newHref !== link.href) { clonedLink.href = newHref; } else { var indexOfQuest = newHref.indexOf('?'); if (indexOfQuest >= 0) { // to support ?foo#hash clonedLink.href = newHref.substring(0, indexOfQuest + 1) + 'jbUpdateLinksId=' + messageId + '&' + newHref.substring(indexOfQuest + 1); } else { clonedLink.href += '?' + 'jbUpdateLinksId=' + messageId; } } link.replaceWith(clonedLink); } } }; })(); </script>