Access CSS file contents via JavaScript

后端 未结 6 768
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 04:29

Is it possible to get the entire text content of a CSS file in a document? F.ex:




        
6条回答
  •  暖寄归人
    2020-11-30 05:14

    If you used XMLHttpRequest to load the page you could get acces to those files without having to load them a second time.

    it's preferable to not duplicate ton reduce bandwidth and efficiency.

    what if the css is generated dynamically and is different depending on the time it is requested?

提交回复
热议问题