Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

133
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda