Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

100
Vistas
botón de desplazamiento avanzado

No tengo ni idea de cómo hacer este efecto.

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Aquí tenemos un ejemplo sencillo de cómo hacerlo.

 <style> p{ display: block; position: relative; width: 136px; } .circle{ position: absolute; height: 5px; width: 5px; background: #00ff00; right: -20px; border-radius: 20px; top: 5px; transition: ease-in-out .2s all; z-index: -1; } .line{ position: absolute; height: 2px; width: 40px; background: #00ff00; right: -70px; border-radius: 20px; top: 5px; transition: ease-in-out .2s all; } p:hover .circle{ height: 60px; width: 60px; background: red; right: -30px; border-radius: 38px; margin: auto; top: -20px; } p:hover .line{ width: 60px; right: -90px; } p:hover .white-on-hover{ color: #fff; transition: ease-in-out .2s all; } </style> <script> window.onload = function(){ //get cms string var cmsText = document.getElementById('cmsText').innerHTML; //separe words cmsText = cmsText.split(' '); //get last words lastWord = cmsText[cmsText.length-1]; //separe letters lastWord = lastWord.split(''); var newLastWord = ''; //concat all letters and add span with class "white-on-hover" before last 4 letters for(let i = 0; i < lastWord.length; i++){ if(i == lastWord.length-4){ newLastWord+='<span class="white-on-hover">'; newLastWord += lastWord[i]; }else if(i == lastWord.length-1){ newLastWord += lastWord[i]; newLastWord+='</span>'; }else{ newLastWord += lastWord[i]; } } //concat all words adding the new last word var newCmsText = ''; for(let i = 0; i < cmsText.length; i++){ if(i != cmsText.length-1){ newCmsText += cmsText[i]; newCmsText += ' '; }else{ newCmsText += newLastWord; } } //change the text for new text document.getElementById('cmsText').innerHTML = newCmsText; } </script> <p><span id="cmsText">title button advanced</span> <span class="circle"></span> <span class="line"></span> </p>

Nota 1: estoy usando muchas etiquetas html, esta no es una buena sintaxis HTML. Este es un ejemplo y es una buena práctica si cambia algunos detalles.

Nota 2: este JavaScript no es la mejor solución, funciona y es muy simple de entender

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda