|
201
|
Programación / Desarrollo Web / ¿Porque en chrome, y otros, el background se ve bien y en Firefox no?
|
en: 11 Febrero 2018, 20:40 pm
|
Estoy retocando el fondo de mi web, ya que estaba mal programado. Y lo hice por CSS, por la cual me fue bien. Pero al verlo en diferentes navegadores, en el Firefox se ve mal y en los otros (chrome, opera, IE, etc.) si, no entiendo: Aquí tengo el código: body{ background-image: url('imagenes/stackofmagazines.jpg'); background-size:500% 50%; -webkit-background-size:500% 50%; -o-background-size:500% 50%; -moz-background-size:500% 50%; background-repeat: no-repeat; background-position: top center; -moz-background-position:left right; background-attachment: fixed; }
en el móvil: https://drive.google.com/open?id=1LgG7YYkSIv_32umXjMPokVIa6KlN91kULo demas si funciona Gracias de antemano
|
|
|
202
|
Programación / Desarrollo Web / ¿Como optimizar mi fondo de página web para móviles y tablets?
|
en: 10 Febrero 2018, 20:08 pm
|
¿Como puedo ajustar mi fondo de web para moviles y tablets? en css. Yo hice una función jQuery que al ser la pantalla de 600px me cambie el atributo "style": $(document).ready(function(){ if(window.matchMedia("(max-width: 600px)").matches){ fondo12 = document.getElementById("fondo1"); fondo12.setAttribute("style","background-image: url('imagenes/fondo_movil.jpg'); background-repeat:no-repeat; background-position: 0% 0%; background-attachment: fixed; background-size: 205% 205%;-webkit-background-size: 205% 205%; -moz-backgrou.nd-size:205% 205%; -o-background-size: 205% 205%; background-color:#F5ECCE;"); } });
Con eso conseguí ajustarlo al movil pero sé que no es así y no se como se hace. Y al hacer la función e cambiado de imagen fondo.jpg a fondo_movil.jpg PD: Si puede ser css mejor, gracias. Gracias de antemano.
|
|
|
204
|
Programación / Desarrollo Web / ¿Como hacer un corrector de ortografía en javascript?
|
en: 27 Enero 2018, 00:30 am
|
Tengo un formulario que al insertar los datos y al enviarlo lo guarda en un DB pero en la base de datos si hay algún carácter especial lo demuestra como error ya que el cliente no pone el código (á,&eagude;etc...), y lo que me gustaría es que mientras el cliente escribe en el textarea vaya corrigiendo. si pone el cliente una á con acento que me lo corrija con el remplace(); algo así: <!DOCTYPE html> <html> <body>
<h2>My First javascript</h2> <input type="text" id="tarea" onkeydown="validar()"> <script> function validar(){ var Tarea = document.getElementById('tarea').value; if (Tarea === "á"){ Tarea.remplace("á","b"); } } </script> </body> </html>
pero no me funciona en cambio si pongo ocument.getElementById('tarea').style.background="yellow"; si va bien. Por que pasa eso? Gracias de antemano
|
|
|
206
|
Programación / Desarrollo Web / Re: ¿Hay alguna función en jQuery Mobile que reemplace attr()?
|
en: 14 Diciembre 2017, 22:04 pm
|
Estas imlementando mal tu codigo. Deberias escuchar el evento ready de jquery, algo asi: $(document).ready(function(){ /*... aca tu codigo ..*/ })
Hola, gracias por su atención pero me he informado que jQuery no se ejecuta en dispositivos móviles y era con jQuery Mobile cosa que se necesita poner y no , pero poniendo bind() no me ejecuta attr() cosa rara, porque teoricamente me tendría que ejecutar. Yo creo que el error está en attr(), pero creo que no, y estoy pidiendo de vuestra ayuda, algunas conclusiones. Gracias, por su atención. Atentamente Drakaris.
|
|
|
207
|
Programación / Desarrollo Web / Re: ¿Hay alguna función en jQuery Mobile que reemplace attr()?
|
en: 10 Diciembre 2017, 21:03 pm
|
<script> $(document).bind(function(){ if (window.matchMedia("(max-width: 600px)").matches){ $("#fondo").attr("style","background-image: url('imagenes/fondo_movil.jpg'); background-repeat:no-repeat; background-position: 0% 0%; background-attachment: fixed; background-size: 205% 205%;-webkit-background-size: 205% 205%; -moz-background-size:205% 205%; -o-background-size: 205% 205%; background-color:#F5ECCE;"); $("#address1").attr("style","bottom:5vmin; position:absolute; left:10%; font-size:9vw;") //Cambiar el footer $("#footer1").attr("style","width:202vw; height:230vh;"); //Cambiar el header $("#header1").attr("style","width:130vw;"); $("#icons").attr("style","float:left;") $(".light_sky").vclick(function(){ $.ajax({ type:'POST', url:'functions.php', data:'func=getEvents&date='+date, success:function(html){ $('#event_list').html(html); $('#event_list').slideDown('slow'); } }); }); } }); </script>
Este, es el código pero no se porque no me lo ejecuta El script de jquery Mobile que implanté es el siguiente: <script type="text/javascript" src="http://u1.linnk.it/qc8sbw/usr/apps/textsync/upload/jquery-mobile-touch.value.js"></script> ¿Es por el script?
|
|
|
209
|
Programación / Desarrollo Web / Cuando utilizo $(document).bind(),¿Que medidas css tomar?
|
en: 10 Diciembre 2017, 00:47 am
|
Hola, estoy haciendo una web responsive y hice una función jQuery y en el móvil no me funcionaba, pero ya lo arreglé, tuve que pone , y , la función va bien en el móvil pero hay otras funciones para moviles que no funcionan, y son porque no se ejecutan, y creo que es por los tipos de medidas css que utilizan que són: %,vmin,vmax,vh,wv,% pero no funcionan y probé con px peo tampoco, y yo me preguntaba que medida css tomar. $(document).bind(function(){ if (window.matchMedia("(max-width: 600px)").matches){ fondo12 = document.getElementById("fondo"); fondo12.setAttribute("style","background-image: url('imagenes/fondo_movil.jpg'); background-repeat:no-repeat; background-position: 0% 0%; background-attachment: fixed; background-size: 205% 205%;-webkit-background-size: 205% 205%; -moz-background-size:205% 205%; -o-background-size: 205% 205%; background-color:#F5ECCE;"); address4 = document.getElementById("address1"); address4.setAttribute("style","bottom:5vmin; position:absolute; left:10%; font-size:9vw;"); //Cambiar el footer foot = document.getElementById("footer1"); foot.setAttribute("style","width:202vw; height:230vh;"); //Cambiar el header header12 = document.getElementById("header1"); header12.setAttribute("style","width:130vw;"); equipo123 = document.getElementById("icons"); equipo123.setAttribute("style","float:left;"); $(".light_sky").vclick(function(){ $.ajax({ type:'POST', url:'functions.php', data:'func=getEvents&date='+date, success:function(html){ $('#event_list').html(html); $('#event_list').slideDown('slow'); } }); }); } });
gracias de antemano
|
|
|
|
|
|
|