How do you apply style rule in Safari Web Inspector?

前端 未结 3 2066
你的背包
你的背包 2021-02-19 20:58

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?

3条回答
  •  遇见更好的自我
    2021-02-19 21:24

    Safari 8.0.8 on OS X

    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.

    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.

提交回复
热议问题