Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php on line 760 Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php on line 760 Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php on line 760 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/comment-template.php on line 1745 Deprecated: wp_getimagesize(): Implicitly marking parameter $image_info as nullable is deprecated, the explicit nullable type must be used instead in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/media.php on line 5180 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/pomo/streams.php on line 26 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/pomo/streams.php on line 29 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/pomo/streams.php on line 160 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/class-wp-block-type.php on line 357 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 378 Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 379 Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 380 Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 381 Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 382 Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 383 Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 378 Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 379 Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 380 Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 381 Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 382 Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 383 Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 378 Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 379 Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 380 Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 381 Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 382 Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 383 Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 378 Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 379 Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 380 Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 381 Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 382 Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/category.php on line 383 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/wp-db.php:760) in /mnt/web522/e0/75/511171875/htdocs/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1719 {"id":529,"date":"2015-01-26T20:15:01","date_gmt":"2015-01-26T18:15:01","guid":{"rendered":"https:\/\/www.pcpolis.es\/blog\/?p=529"},"modified":"2017-09-10T12:12:09","modified_gmt":"2017-09-10T10:12:09","slug":"web-adaptable-responsive","status":"publish","type":"post","link":"https:\/\/www.pcpolis.es\/blog\/css\/web-adaptable-responsive\/","title":{"rendered":"Web adaptable ( Responsive )"},"content":{"rendered":"

\"responsive\"<\/p>\n

01 Introducci\u00f3n<\/h3>\n

La aparici\u00f3n de dispositivos cada vez m\u00e1s peque\u00f1os con acceso a internet ha traido consigo la necesidad de adaptar las Webs, utilizando el c\u00f3digo que en los \u00faltimos tiempos ha surgido para cubrir esta necesidad. Estoy hablando de HTML5, CSS3 y, como no, del siempre \u00fatil del lado del cliente JavaScript. He resumido los pasos, pero abajo tienes el videotutorial que me ha servido de gu\u00eda.<\/p>\n

02 Pasos para hacer la web adaptable ( responsive design )<\/h3>\n

HTML<\/strong><\/p>\n

Lo primero es colocar en la cabecera html (head) la etiqueta de nombre \u00abviewport<\/a>\u00ab,\u00a0 (todo el d\u00f3digo est\u00e1 abajo), que permitir\u00e1 definir la \u00abventana\u00bb correcta, dependiendo del dispositivo. Tambi\u00e9n habr\u00e1 que agregar el c\u00f3digo de la capa que contendr\u00e1 un men\u00fa alternativo para resoluciones peque\u00f1as, se puede colocar justo antes de la capa que contiene el men\u00fa actual.<\/p>\n

Si usamos Font-aweson<\/a> para el icono, agregar en la cabecera (head) el enlace a la hoja de estilos de Font-aweson. Previamente se deben haber descargado y situado estos ficheros en la web.<\/p>\n

CSS<\/strong><\/p>\n

Incluir las Media Queries en la hoja de estilos, con las modificaciones necesarias. Lo que intentamos conseguir es lo siguiente: cuando un dispositivo tenga una resoluci\u00f3n inferior a 500 pixeles , por ejemplo, se ocultar\u00e1 o desplazar\u00e1 el men\u00fa actual y se mostrar\u00e1 la nueva capa, mucho m\u00e1s simple, que incluye el texto e iconos identificativos. Al pulsar sobre el icono, aparecer\u00e1n todos los elementos del men\u00fa que ten\u00edamos previamente, pero adaptados a las nuevas medidas. Esto lo conseguimos con Javascript, espec\u00edficamente con su librer\u00eda jquery.<\/p>\n

JQuery<\/strong><\/p>\n

Agregar el c\u00f3digo javascrip necesario para cargar la biblioteca Jquery y el archivo menu_responsive.js, con las funciones que permitir\u00e1n alternar entre men\u00fas. Este c\u00f3digo se coloca justo antes del cierre de la equiqueta html body.<\/p>\n

03 Conclusi\u00f3n<\/h3>\n

A continuaci\u00f3n tienes el c\u00f3digo para un ejemplo sencillo de Men\u00fa adaptable, pero es s\u00f3lo una referencia que deber\u00e1s sustituir seg\u00fan tus propias necesidades. Por ejemplo, en el caso de este blog, como todos los enlaces eat\u00e1n dentro de la columna derecha, la he considerado como la capa de men\u00fa.<\/p>\n

Recuerda que las etiquetas de los iconos tambi\u00e9n deben llevar sus propias clases seg\u00fan las intrucciones que encontrar\u00e1s en la p\u00e1gina de Font Awesome.<\/p>\n

Fuentes \/ Recursos<\/h5>\n

Font aweson ><\/a> | videotutorial ><\/a> | videotutorial\u00a0 (ingl\u00e9s)><\/a> | Media queries<\/a> | CSS clip Property<\/a> (para recortar im\u00e1genes) |<\/p>\n

Ver C\u00f3digo (+\/-)<\/a><\/h6>\n
\n

HTML<\/h2>\n
Menu adaptable (responsive)\r\n\r\n\r\n\r\n
<\/em>Men\u00fa<\/a><\/div>\r\n