简体   繁体   English

IE8开发人员工具-添加CSS样式

[英]IE8 Developer Tools - add CSS style

I use the Web Developer Toolbar in FireFox to test CSS-edits. 我使用FireFox中的Web Developer Toolbar来测试CSS编辑。 I want to do the same in IE, and I can somewhat do that with IE8's Developer Tool. 我想在IE中执行相同的操作,并且可以使用IE8的开发人员工具进行某些操作。

However I can't add a style in Developer Tools, only edit existing styles - does any of you guys know of a way to edit the CSS like you can do with Chris Pedericks Web Developer Toolbar? 但是我不能在开发人员工具中添加样式,只能编辑现有样式-你们中有人知道像Chris Pedericks Web开发者工具栏一样可以编辑CSS的方法吗?

You can: 您可以:

  • add a style attribute (right click the html tag and click add attribute (with the name style, and then edit the style attribute once its added) 添加样式属性(右键单击html标记,然后单击添加属性(具有名称样式,然后在添加样式属性后对其进行编辑)
  • Click the CSS tab, right click the empty space, and add a rule (this is like adding a line to your css file) 单击CSS选项卡,右键单击空白处,然后添加一条规则(就像在css文件中添加一行一样)

Adding to what Gabriel mentioned above. 除了上面提到的加百列。

For a quick addition to test and see the effect I do it a bit differently. 为了快速添加测试并查看效果,我做了一些不同的操作。

With the HTML tab selected choose the "Attributes" panel next to Style, Trace Styes and Layout. 选择HTML选项卡后,选择“样式”,“跟踪样式”和“布局”旁边的“属性”面板。

Click the "+" button and begin typing the css style you would like to add. 单击“ +”按钮,然后开始输入要添加的CSS样式。 The new style attribute is added automatically in the DOM view panel. 新样式属性将自动添加到DOM视图面板中。

Hope this helps. 希望这可以帮助。

I'm on my Mac right now, but I remember running into that. 我现在在Mac上,但是我记得碰到了。

When looking at the right side of the Developer Tool, you see a list of CSS styles. 当查看开发人员工具的右侧时,您会看到CSS样式列表。 Above that you see a few 'tabs': Style, Trace Styles, Layout, Attributes. 在其上方,您会看到一些“标签”:样式,跟踪样式,布局,属性。 If I remember correctly you can't change them in the style tab. 如果我没记错,您将无法在“样式”标签中进行更改。 But you can change them in one of the other tabs. 但是您可以在其他选项卡之一中进行更改。 You might have to edit them through the style attribute. 您可能必须通过style属性对其进行编辑。

您可以尝试使用Firebug Lite,但要进行设置需要一些工作。

Follow following steps: 1. Click on Developers Tool 2. In Html select element for which you want to add css 3. Select attribute tab present on right side 4. Add Name and Value. 请执行以下步骤:1.单击Developers Tool。2.在HTML中,选择要为其添加CSS的元素。3.选择右侧显示的属性选项卡。4.添加名称和值。 Check your style is applied to html element. 检查您的样式是否应用于html元素。

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

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