html - 如何使用浏览器检查工具检查网站上的所有 .css/.scss 类?

标签 html css google-chrome-devtools web-inspector

如何使用浏览器检查工具检查网站上的所有 .css/.scss 类?我正在尝试查看特定网站的 .css 中列出的所有属性。 具体来说,在 GitHub 的拉取请求字段中指定的 CSS 类的所有样式?

使用 Chrome 检查器,我可以看到一些 CSS 类的 CSS 类属性,但其中一些不会出现在检查器上。

该字段引用了该类,但我没有在检查器中看到它。例如,在拉取请求正文字段中,我看不到任何 js-*** CSS 类属性:

<textarea name="pull_request[body]" id="pull_request_body" placeholder="Leave a comment" aria-label="Comment body" class="form-control input-contrast comment-form-textarea js-comment-field js-paste-markdown js-task-list-field js-quick-submit js-size-to-fit js-suggester-field js-session-resumable js-saved-reply-shortcut-comment-field"></textarea>

最佳答案

也许没有。根据我的经验,如果该类以 js- 开头,则意味着它意味着处理 js 选择器。类似于:document.querySelector('js-paste-markdown').addEventsListener...

你可以在他们的代码中看到它。例如类js-saved-reply-shortcut-comment-field:

screenshot of the code example

请参阅本教程:https://philipwalton.com/articles/decoupling-html-css-and-javascript/ (搜索 js-*)

关于html - 如何使用浏览器检查工具检查网站上的所有 .css/.scss 类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52684261/

相关文章:

javascript - 连续挑出一个td

html - 把一个div变成一个链接

html - 悬停在元素上后不显示下拉菜单

javascript - jQuery 委托(delegate) mouseenter 事件仅在单击时触发

javascript - JavaScript 发生错误时查找实际源文件行号?

javascript - DevTools 控制台 - 将其关闭

jquery - 显示一个 <div> 并隐藏另一个

html - 视频在 Firefox 中播放,但在 Chrome/Opera 中不播放

asp.net - 将 div 中的 HTML 保存为图像

html - 对齐三个div