Last active
March 4, 2018 17:16
-
-
Save JoshuaFrontEnd/442ad28b0885daf15d8e83b6ced28e86 to your computer and use it in GitHub Desktop.
Snippet de como crear un mapa responsivo de Google tambien podria aplicar un video de Youtube o Vimeo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.map-responsive{ | |
overflow:hidden; | |
padding-bottom:56.25%; | |
position:relative; | |
height:0; | |
} | |
.map-responsive iframe{ | |
left:0; | |
top:0; | |
height:100%; | |
width:100%; | |
position:absolute; | |
} | |
</style> | |
<div class="map-responsive"> | |
<iframe src="mapa" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe> | |
</div> | |
<!-- Para controlar el ancho se debe agregar este div dentro de un contenedor --> | |
<!-- Para controlar la altura se debe de emular con el padding bottom de la clase "map-responsive" --> | |
<!-- Una alternativa a esta solucion puede ser usar viewport units --> | |
<!-- Source: https://www.ostraining.com/blog/coding/responsive-google-maps/ --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment