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

332
Views
La altura del encabezado CSS permanece constante después de calc ()
--dis: calc(var(--max-height) - var(--min-height)); /* @media large{--min-height:13rem}; @media small{--min-height:6.5rem}; --max-height:75vh; */ --percent: calc(var(--scroll-ani) / var(--dis)); /* in js: document.body.style = "--scroll-ani:" + document.scrollingElement.scrollTop; This code will correctly output the distance between the top of the visual area and the top of the page */ --percent-limited: calc((var(--percent) - 1 - abs(var(--percent) - 1)) / 2 + 1); /* If percent > 1, percent-limited = 1, If percent < 1, percent-limited = percent, Percent cannot be less than 0. */ obj{ position: fixed;/* header itself will not cause the page height to change*/ width:100vw; height: calc(var(--max-height) - var(--dis) * var(--percent-limited)); }

Pero la altura permanece sin cambios.

--porcentaje de trabajo limitado como este:Gráfica de y=(x-1-abs(x-1))/2+1 Es la gráfica de y=(x-1-abs(x-1))/2+1

x nunca será menor que 0, por lo que el rango de y será [0,1]

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

La función CSS calc() solo permite la multiplicación cuando al menos un lado no tiene unidades .

La multiplicación aquí no es posible actualmente con CSS:

 height: calc(var(--max-height) - var(--dis) * var(--percent-limited));

Artículo de trucos CSS en calc()

about 4 years ago · Juan Pablo Isaza 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!