您如何在Safari Web Inspector中应用样式规则? [英] How do you apply style rule in Safari Web Inspector?

查看:106
本文介绍了您如何在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

  1. 右键单击任何元素,然后从弹出菜单中选择检查元素
  2. 确保在检查员的右侧选择
  3. 样式 规则
  4. 然后您可以通过单击 +新建规则添加单个规则,也可以简单地单击并在出现 Click to Edit 的位置开始键入规则(请参见下图)
  5. 输入新规则,这些规则将应用于浏览器窗口中被检查"的元素.
  1. Right-click any element and select Inspect Element from the pop-up menu
  2. Ensure Styles and Rules are selected on the right hand side of the inspector
  3. 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)
  4. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆