Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="slider-wrapper">
  <div id="contador_titulos"></div>
  <body onload="marcha()"/>
        <a href="javascript:cambio(1);" class="mas" title="Avanzar una"><i style='font-size:44px;color:#000' class='fas'>&#xf04b;</i></a>
    <a href="javascript:cambio(-1);" class="menos" title="Retroceder una"><i style='font-size:44px;color:#000;transform: rotateZ(180deg);' class='fas'>&#xf04b;</i></a>
    <a href="javascript:retroceder()" class="retr" title="Marcha Atrás"><b>&laquo;</b></a>
    <a href="javascript:avanzar()" class="fren" title="Marcha Adelante"><b>&raquo;</b></a>
    <div id="slider">
      <a href="javascript:enlazar()">
        <img id="slider" title="Ir a la página" src="https://1.bp.blogspot.com/-P-oZkvSwQpo/XPKbKqISYVI/AAAAAAAAaXo/WkZi6ihVNhc-ONMcBeOVMeK2TQMT_pBQgCKgBGAs/s800/panoramio-9725427.jpg"></a>
      <div class="opciones">
        <form accept-charset='utf-8' name="form" method="post" action="javascript:automatico(this.form.tiempo.value)">
          <select title="Poner el tiempo" style="color: #ffffff;background-color: #003333;font-size:17px;border:3px solid #a2a1a1;" name="tiempo">
            <option value="4000">Tiempo</option>
            <option value="2000">&nbsp;&nbsp;2 Seg.</option>
            <option value="3000">&nbsp;&nbsp;3 Seg.</option>
            <option value="5000">&nbsp;&nbsp;5 Seg.</option>
            <option value="7000">&nbsp;&nbsp;7 Seg.</option>
            <option value="10000">&nbsp;10 Seg.</option>
            <option value="15000">&nbsp;15 Seg.</option>
          </select>
          <input style="color: #ffffff;background-color: #003333;font-size:17px;" title="Validar" type="submit" name="Button" value="OK">
        </form>
      </div>
	  <div class="atribucion"style="font-family: Times New Roman;text-align: center;font-size: 20px;margin-top:10px;color:#ffffff;"><br>
              <span> Los dueños de las fotos tienen el derecho de autor</span></div>	  
    </div>
</div>
              
            
!

CSS

              
                 body {
   background-color: #33FF00
 }
 /* Contenedor general */
 
#slider-wrapper {
 overflow:hidden;
 position: relative;
 max-width: 800px;
 width: 100%;
 margin: 0 auto;
 padding: 0 10px;
 font-family: arial, sans-serif;
 font-size: 0;
 -webkit-box-sizing: border-box;
 -moz-box-sizing: border-box;
 box-sizing: border-box;
 }
 /* Contenedor slider */
 #slider { 
 background:#d0e0e3; 
 position: relative;
 width: 100%;
 padding-bottom: 67%; 
 overflow: hidden;
 border:1px solid #333;
 border-radius: 5px;
 -webkit-box-sizing: border-box;
 -moz-box-sizing: border-box;
 box-sizing: border-box;
 }
 #slider > a {
 position:absolute;
 top:0;
 left:0;
 width: 100%;
 max-height: 100%;
 }
 /* Ajuste de las imágenes */
 #slider img {
 text-align: center;
 max-width: 100% ;
 max-height: 100%;
 position: initial;
 margin:0;
 padding:0; 
 border:0;
 }
/* Flechas de navegación */
 a.mas, a.menos {
 position: absolute;
 top: 45%;
 left: 0px;
 z-index: 10;
 text-decoration: none;
 -webkit-transition: all 1000ms ease;
 -moz-transition: all 1000ms ease;
 -ms-transition: all 1000ms ease;
 -o-transition: all 1000ms ease;
 transition: all 1000ms ease;
 }

 a.mas {
 margin-left: -80px;
 opacity: 0;
 left: 100%;
 }
 #slider-wrapper:hover a.mas {
 opacity: 1;
 }

 a.menos {
 left: 0;
 margin-left: 20px;
 opacity: 0;
 }
 #slider-wrapper:hover a.menos {
 opacity: 1;
 }
 /*Las Flechas dobles*/
 a.fren,  a.retr{
 position: absolute;
 bottom:0;
 z-index: 100;
 width: 40px;
 height: 40px;
 opacity: 0;
 line-height: 30px;
 font-size: 50px;
 color: #ffffff;
 text-decoration: none;
 -webkit-transition: all 1000ms ease;
 -moz-transition: all 1000ms ease;
 -ms-transition: all 1000ms ease;
 -o-transition: all 1000ms ease;
 transition: all 1000ms ease;
 }
 a.fren {  
 left: 100%;
 margin-left: -45px;
 }
 #slider-wrapper:hover a.fren {
 opacity: 1
 }
 a.retr {
 left: 0%;
 margin-left: 20px;
 }
 #slider-wrapper:hover a.retr {
 opacity: 1
 }
 .atribucion {
 position: absolute;
 font-size: large;
 border-radius: 0px 0px 5px 5px;
 text-align: center;
 line-height: 15px;
 text-shadow: 0 2px 2px black, 0 2px 6px white;
 bottom:-2.5em;
 width: 100%;
 height: 2.4em;
 z-index: 99;
 background: #000000;
 opacity: .6;
 -webkit-transition: all 1500ms ease;
 -moz-transition: all 1500ms ease;
 -ms-transition: all 1500ms ease;
 -o-transition: all 1500ms ease;
 transition: all 1500ms ease;
 }
 #slider-wrapper:hover .atribucion {
 bottom: 0;
 }
 /*El bloque de titulos y contador*/
  #contador_titulos {
   position: absolute;
   text-align: center;
  line-height: 15px;
   text-shadow: 0 2px 2px black, 0 2px 6px white;
   bottom:.5em;
   width: 100%;
   background: transparent;
   z-index: 98;
   opacity: 1;
 }
 /*El selector de tiempo*/
 .opciones {
 position: absolute;
 text-align: center;
 top: 0;
 margin-top:-30px;
 width: 100%;
 z-index: 100;
 -webkit-transition: all 1000ms ease;
 -moz-transition: all 1000ms ease;
 -ms-transition: all 1000ms ease;
 -o-transition: all 1000ms ease;
 transition: all 1000ms ease;
 }

 #slider-wrapper:hover .opciones {
 margin-top: 0;
 }
 @media screen and (max-width:600px){
   a.mas img, a.menos img {
   width:40px;height: 40px;
   } a.mas {
   margin-left: -60px;
   }}
              
            
!

JS

              
                 /*NO EDITAR ÉSTA ZONA
    Autor: https://villalisaceliano.blogspot.com/p/aplicacion.html 
  El sistema es diseño adaptable (RVD) y consta de las funciones: inicio automatico y variable en dos direciones. hacia atrás solamente un ciclo; paso manual, */
 //<!--
   var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
                 var temporizador = null;
                 var contador = null;
                 var tiempo = null;

                 function marcha() {
                   document.images.slider.src = fotos[0];
                   cambio(-1);
                   fotos.push(0);
                   tiempo = parseInt(1000.0 * 4);
                   if (isNaN(tiempo) || tiempo <= 0);
                   else temporizador = setTimeout("avanzar()", tiempo);
                 }

                 function adelante() {
                   avanzar();
                 }

                 function atras() {
                   retroceder();
                 }

                 function automatico(s) {
                   clearTimeout(temporizador);
                   tiempo = parseInt(s);
                   if (isNaN(tiempo) || tiempo <= 0)
                     alert('Hay que poner el "Tiempo"');
                   else temporizador = setTimeout("avanzar()", tiempo)

                 }

                 function cambio(avance) {
                   clearTimeout(temporizador);
                   contador += avance;
                   if (contador == fotos.length) contador = fotos.length - 1;
                   else
                   if (contador < 0) contador = 0;
                   document.images.slider.src = fotos[contador];
                   window.status = contador + 1 + " / " + tex.length;              
                 }

                 function retroceder() {
                   clearTimeout(temporizador);
                   cambio(-1)
                   if (contador < fotos.length - 1) temporizador = setTimeout("retroceder()", tiempo)
                 }

                 function avanzar() {
                   clearTimeout(temporizador);
                   cambio(1)
                   if (contador < fotos.length - 1) temporizador = setTimeout("avanzar()", tiempo)
                   else reinicio()
                 }

                 function reinicio() {
                   contador = 0;
                   cambio(-1);
                   setTimeout("avanzar()", tiempo)
                   document.images.slider.src = fotos[0];
                 }

                 function enlazar() {
                   var nuevaVentana = window.event;
                   nuevaVentana = window.open(enlaces[contador])
                 }

 function titulos() {
   var texto = "<big><font color='ffffff' face='Arial' style='font-size:17px;opacity:1'>" + window.status + '<br>' + tex[+contador] + "</font></big>"
   if (document.all)
     document.all.contador_titulos.innerHTML = texto
   else if (document.getElementById)
     document.getElementById("contador_titulos").innerHTML = texto
   else
      document.innerHTML(texto)
 }
 if (!document.all && !document.getElementById)
   titulos()

 if (document.all || document.getElementById)
   setInterval("titulos()", 50)
   /*los numeros de las fotos*/
 var fotos = new Array(
"https://1.bp.blogspot.com/-P-oZkvSwQpo/XPKbKqISYVI/AAAAAAAAaXo/WkZi6ihVNhc-ONMcBeOVMeK2TQMT_pBQgCKgBGAs/s800/panoramio-9725427.jpg",
"https://1.bp.blogspot.com/-JQ3uWAHRIS0/XPKbKtCZiyI/AAAAAAAAaXo/FgJAOYOO1bcU687QRT4Z2jJmWno2u0a1gCKgBGAs/s800/panoramio-6582337.jpg",
"https://1.bp.blogspot.com/-CNpaNwZb4yU/XPKbKllm5GI/AAAAAAAAaXo/tpMqU24drXkC4-lUkldcytl5-q8hMwGNQCKgBGAs/s800/panoramio-9725585.jpg",
"https://1.bp.blogspot.com/-IdK8iay-AT0/XPKbKnMF0ZI/AAAAAAAAaXo/OUrJEPtlPPsOa1sHUNiX2E_is_IYKmvzgCKgBGAs/s800/panoramio-9929990.jpg",
"https://1.bp.blogspot.com/-TyRVMHvh-q4/XPKbKuvGu7I/AAAAAAAAaXo/VZKTST0q09Mssm9iMX2mdiG5iuHyjAZQwCKgBGAs/s800/panoramio-9953006.jpg",
"https://1.bp.blogspot.com/-efieHRWYRCg/XPKbKpBsDeI/AAAAAAAAaXo/1BNGlzwQDKkZ6MZUIZJiBu3O9ElY2rk3ACKgBGAs/s800/panoramio-9980297.jpg",
"https://1.bp.blogspot.com/-LAMn1rrHi3w/XPKbKvU04AI/AAAAAAAAaXo/CJ6T94jlV_4sKqs6DWfz08erJUj06KxZgCKgBGAs/s800/panoramio-11242928.jpg",
"https://1.bp.blogspot.com/-VKKWiqlJZ80/XPKbKqsvBFI/AAAAAAAAaXo/WUH0xf4l2D4lTEDuYsvJbAR8bYwQ_CagwCKgBGAs/s800/panoramio-11295122.jpg",
"https://1.bp.blogspot.com/-wT5F2_CIYcA/XPKbKhj2qBI/AAAAAAAAaXo/lUSGFLovSwcKOM_9yswr1jNj6wTL1tsXwCKgBGAs/s800/panoramio-12377448.jpg",
"https://1.bp.blogspot.com/-dWOqirlNsVY/XPKbKkVEYnI/AAAAAAAAaXo/oPY9KeoQJd4qy8omTozsHruang7JVfpPgCKgBGAs/s800/panoramio-11242909.jpg")
 /*A la página que debe enlazar*/
 var enlaces = new Array(
	"https://www.google.com/maps/@0,0,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipPh3wWwxfLY_8kNEeq_NawJnCI8FXR6qsdr9rm1!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipPh3wWwxfLY_8kNEeq_NawJnCI8FXR6qsdr9rm1%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@42.3128759,-6.0380011,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipOM-pRaMjMcFQ_mT3SsqQAjibNFW05jgf31AMXr!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipOM-pRaMjMcFQ_mT3SsqQAjibNFW05jgf31AMXr%3Dw365-h273-k-no!7i2848!8i2134",
	"https://www.google.com/maps/@0,0,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipMtap5H66iCWxvdPS36RP88n1cTNvSgK4X9_4lG!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipMtap5H66iCWxvdPS36RP88n1cTNvSgK4X9_4lG%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@42.3128759,-6.0380011,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipOYMwiO0yUDZthFVzKzwmlZ3VCu1g-4uGtzBhHk!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipOYMwiO0yUDZthFVzKzwmlZ3VCu1g-4uGtzBhHk%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@42.3128759,-6.0380011,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipNun293d6Y_7q1XnLJeN8MgKz9rxTqn4ssgNVm1!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipNun293d6Y_7q1XnLJeN8MgKz9rxTqn4ssgNVm1%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@0,0,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipP_9JguB7fXQKDfb7nt8SAD0IOMe2AC4Ke1Gb-9!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipP_9JguB7fXQKDfb7nt8SAD0IOMe2AC4Ke1Gb-9%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@42.3128759,-6.0380011,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipNQDtWNZHnqoe9lt3BPXCimOiDoIbzz6VNYCPck!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipNQDtWNZHnqoe9lt3BPXCimOiDoIbzz6VNYCPck%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@0,0,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipPt1Zq0x1LMl7WhNafW3arBJLq-CD3aIMRpO9Q7!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipPt1Zq0x1LMl7WhNafW3arBJLq-CD3aIMRpO9Q7%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@0,0,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipMZatKIUk_56Ws1rE19uEGk6LBI4CZaaclSE8IB!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipMZatKIUk_56Ws1rE19uEGk6LBI4CZaaclSE8IB%3Dw365-h273-k-no!7i3072!8i2304",
	"https://www.google.com/maps/@0,0,3a,75y,90t/data=!3m8!1e2!3m6!1sAF1QipPeq5Pp1d9MTESzXsbmj0o1ZCQNv-qcNObU6UPp!2e10!3e12!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipPeq5Pp1d9MTESzXsbmj0o1ZCQNv-qcNObU6UPp%3Dw365-h273-k-no!7i3072!8i2304"

 );
 /*Los titulos*/
 tex = new Array(
 "Puente rio Limia",
	"El Campanario", 
	"Parque do Toural", 
	"Puesta de Sol",
	"Piedra Romana",
	"Santiagomillas",
	"Campanario Villalis",
	"Adrados de Ordás",
	"Vivero", 
	"Castillo de Palacios"
 );
 //-->
              
            
!
999px

Console