Home >Web Front-end >JS Tutorial >You can write a CSS coverage test script with just 20 lines of code_Basic knowledge

You can write a CSS coverage test script with just 20 lines of code_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 17:35:31968browse

Document.styleSheets stores a collection of all CSS rules on the current page. Through it, you can traverse all selectors defined in the page