How to find which CSS files are used for current page

前端 未结 7 628
小鲜肉
小鲜肉 2021-01-12 02:07

I have a lot of CSS files on the page. But a lot of these files are not used by styles. Is it possible to determine which files are used by page and which not.

7条回答
  •  礼貌的吻别
    2021-01-12 02:41

    New in Chrome 59 is the coverage tool that shows you CSS and JS code coverage. It'll show you what percentage of CSS files are used on a page. When you click on that file, it'll show you which styles are used and which ones aren't. More info here: https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage

提交回复
热议问题