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

136
Vistas
How get all style of element

I have style like this :

.filter {
      background-image: url("../images/index.png"); !important;
      background-blend-mode: difference !important;
      filter: invert(1);
      box-shadow: inset 0 0 0 1px black;
      **other style**
    }

and I wanna get all the style it is possible ?

if I want get with property-name like

$(selector).css(property-name:property-value);

I should write many line code for it because the style is many.

  • I can not use inline style and get it with attr
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You cannot get the properties of a single CSS class, but you can get all the computed style of an element:

var e = getElementById('myElement');
console.log( getComputedStyle(e) );
about 4 years ago · Juan Pablo Isaza Denunciar

0

You can use getComputerStyle

const h3 = document.querySelector("h3");
const result = document.getComputedStyle(h3).content();

GetComputedStyle Docs

Also you can use getAttribute method with style

conat h3 = document.querySelector("h3");

let styles = h3.getAttribute("style");
styles.replace(" ", "")
    .split(";")
    .map(s => s.split(":"));
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