search

Home  >  Q&A  >  body text

css - Is there any plug-in that can directly output the styles in the style sheet to the corresponding elements to style?

Looking for a plug-in like this, which is to write the style and output it to the corresponding element to the style

eg:

<style>
.foobar { background: #fff; }
</style>
<p id="a" class="foobar"></p>
<p id="b" class="foobar"></p>

<!-- 转换为 ↓↓↓ -->

<p id="a" class="foobar" style="background: #fff;"></p>
<p id="b" class="foobar" style="background: #fff;"></p>
学习ing学习ing2779 days ago894

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-24 09:45:08

    I don’t know why you want to do this. Using css is for browser caching and better maintenance, but outputting it to style only increases these problems

    reply
    0
  • 欧阳克

    欧阳克2017-06-24 09:45:08

    I found it myself
    https://github.com/jonkemp/gu...

    reply
    0
  • Cancelreply