Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

117
Views
Ejecute SVG Draw line animate o invierta SOLAMENTE cuando su contenedor esté en la ventana gráfica

Implementé un código que dibuja un trazo de línea svg desde una posición específica hasta el final de un elemento, pero mi problema es que el dashoffset de la línea svg se genera desde la parte superior de mi ventana y quiero que se active justo después. la ventana gráfica del contenedor svg mencionado.

ejemplo: https://altsdigital.com/

 var triangle = document.getElementById("star-path"); var length = triangle.getTotalLength(); triangle.style.strokeDasharray = length; triangle.style.strokeDashoffset = length; window.addEventListener("scroll", myFunction); function myFunction(e) { var scrollpercent = (document.body.scrollTop + document.documentElement.scrollTop) / (document.documentElement.scrollHeight - document.documentElement.clientHeight); // console.log(scrollpercent) var draw = length * scrollpercent; triangle.style.strokeDashoffset = length - draw; }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!