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

141
Views
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 answers
Answer question

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 Report

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 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!