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

133
Views
Los estilos de nodo JS no se aplican si están en un bloque if

No se aplica el estilo superior ni inferior. ¿Cómo puedo arreglar esto?

 let btn = document.createElement("button"); btn.textContent = "Button"; btn.style.position = "fixed"; if (this.anchorBottom) { btn.style.bottom = this.y; console.log(true) } else { btn.style.top = this.y; } btn.style.right = 0; document.body.appendChild(btn);

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Proporcione una unidad también.

 let btn = document.createElement("button"); btn.style.position = "fixed"; if (this.anchorBottom) { btn.style.bottom = `${this.y}px`; console.log(true) } else { btn.style.top = `${this.y}px`; } btn.style.right = '0px'; document.body.appendChild(btn);

Recuerde, no está limitado a usar solo valores px .

about 4 years ago · Santiago Trujillo Report
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!