search

Home  >  Q&A  >  body text

javascript - [CSS + JS] How to use JS code to get all calculated styles of elements and corresponding values? ?

Like the title

How to get?

Styles: Only and should contain inline styles, internal styles ,external styles. There should be no browser default attributes and values


欧阳克欧阳克2768 days ago1255

reply all(2)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-07-06 10:38:05

    getComputedStyle

    reply
    0
  • 扔个三星炸死你

    扔个三星炸死你2017-07-06 10:38:05

    Gu Bai has asked this question, but the answer he got is always:

    1. Get all attributes (no value)

    2. Get individual values ​​(specified)

    Cannot be found on the Internet:

    {
    Use JS code to obtain all styles of elements after calculation and with corresponding values ​​;
    }

    Maybe my search method is wrong, so I came to SF to find answers from experts

    reply
    0
  • Cancelreply