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

99
Views
Aplicar ID de CSS a través de JavaScript

Voy a aplicar todos estos efectos CSS a otra imagen a través del código JavaScript seleccionando imágenes que tengan ese efecto CSS.

#escala de grises { filtro: escala de grises(1); }

 #sepia { filter: sepia(1); } #invert { filter: invert(1); } #blur { filter: blur(2px); } #saturate { filter: saturate(2); } #contrast { filter: contrast(2); }

Con este código, la cantidad de comandos aumenta y quiero escribir mucho más corto:

 document.getElementById('#yourId').style.property = new style;

dentro del evento

 const handleFilter = (e) => { const { target } = e; const { id: filter } = target; // filter: "grayscale" | "sepia" | "invert" | "hue-rotate" | "contrast" | "saturate" | "blur" };
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!