您如何在Safari Web Inspector中应用样式规则? [英] How do you apply style rule in Safari Web Inspector?
本文介绍了您如何在Safari Web Inspector中应用样式规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Chrome开发者工具可让您在样式"窗格中应用样式规则.我尚未在Safari(样式规则"窗格)中找到实现此目的的方法.有人知道这是否可能吗?
Chrome Developer Tools allows you to apply a style rule in the Styles pane. I haven't found a way to do this in Safari (Style Rules pane). Any one know if it is possible?
此外,Safari是否具有像Chrome一样的标尺?
Also, does Safari have rulers like Chrome does?
推荐答案
OS X上的Safari 8.0.8
- 右键单击任何元素,然后从弹出菜单中选择检查元素 确保在检查员的右侧选择
- 样式 和规则
- 然后您可以通过单击 +新建规则添加单个规则,也可以简单地单击并在出现 Click to Edit 的位置开始键入规则(请参见下图)
- 输入新规则,这些规则将应用于浏览器窗口中被检查"的元素.
- Right-click any element and select Inspect Element from the pop-up menu
- Ensure Styles and Rules are selected on the right hand side of the inspector
- You can then either add individual rules by clicking + New Rule, or simply click and start typing rules where Click to Edit appears (refer to image below)
- Enter your new rules and these will be applied to the element being "inspected" in the browser window.
至于标尺?好吧,我还没有找到一个,但是 Inspect 按钮会在您将元素悬停在浏览器窗口中时为您提供元素的尺寸.
As for a ruler? Well, I haven't found one, but the Inspect button will give you the dimensions of elements when hovered in the browser window.
这篇关于您如何在Safari Web Inspector中应用样式规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文