简体   繁体   English

在Chrome检查器开发人员工具(“检查器样式表”)中添加新的空白样式表的最快方法

[英]Fastest way to add a new blank stylesheet in Chrome's inspector developer tool (“Inspector stylesheet”)

Usually, when I want to test CSS modifications, live, in Chrome, I use: 通常,当我想在Chrome中实时测试CSS修改时,会使用:

  • Right click > Inspect 右键单击>检查

  • Use the bottom right pannel, and use the + button to add a new class, and then edit it there. 使用右下方的面板,并使用+按钮添加新类,然后在此处进行编辑。

    在此处输入图片说明

But I've noticed there's even a handier way: open an "Inspector stylesheet" that opens a blank CSS document, that can be edited, and modifications are displayed live: 但我注意到,还有一种更简便的方法:打开“检查器样式表”,该样式表打开一个空白CSS文档,可以对其进行编辑,并实时显示修改内容:

在此处输入图片说明

Question: what's the easiest/fastest way to open such an "Inspector stylesheet" in Google Chrome? 问题: 在Google Chrome浏览器中打开这种“检查器样式表”的最简单/最快的方法是什么?

(by fastest, I mean faster than Right click, Inspect, + add a new class, click on the little inspector stylesheet link, etc.) (以最快的速度,我的意思是比右键单击,检查, +添加新类,单击小检查器样式表链接等快)。

I cannot find it in a menu of Chrome's console/developer tools. 我无法在Chrome的控制台/开发者工具菜单中找到它。 Is there a keyboard shortcut that would open such an "Inspector stylesheet"? 是否有键盘快捷键可以打开这样的“检查器样式表”?

I don't have one easy shortcut, but I can get you there a tiny bit faster: 我没有一个简单的捷径,但是我可以让您更快地到达那里:

  1. F12 to open DevTools. F12打开DevTools。
  2. button at top of Styles-panel on Elements tab, to create inspector-stylesheet. 单击“ 元素”选项卡上“样式”面板顶部的按钮,以创建检查器样式表。
  3. Doubleclick 双击 to open. 打开。

Once inspector-stylesheet is created, and I close it or close DevTools, how to find it again? 创建检查器样式表后,我将其关闭或关闭DevTools,如何再次找到它?

  • If you've closed DevTools when the inspector-stylesheet was still open, just go to the Sources tab directly (in DevTools, topbar) and the inspector-stylesheet should still be open. 如果在检查器样式表仍处于打开状态时关闭了DevTools,只需直接转到“ 源”选项卡(在DevTools的顶部栏中),并且检查器样式表仍应处于打开状态。
  • If you've closed the inspector-stylesheet itself, then, while on the Sources tab, press Ctrl + P and type "inspector-stylesheet" , usually after "in..." you will already see the inspector-stylesheet at the top of the suggestion-list of available files. 如果您已关闭检查器样式表本身,那么在“ 源”选项卡上,按Ctrl + P并键入“ inspector-stylesheet” ,通常在“ in ...”之后您将已经在顶部看到检查器样式表可用文件的建议列表。
    And it should also still be visible at the top of the Styles-panel on the Elements tab, where you first created it. 而且,它在您第一次创建它的“ 元素”选项卡上的“样式”面板顶部也应该仍然可见。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM