## GetComputedStyle(Element) {#getcomputedstyle}

此方法用于获取在 CSS2. 中定义的计算样式

```csharp
public ICSSStyleDeclaration GetComputedStyle(Element element)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| element | Element | 要计算其样式的元素。此参数不能为空。 |

### 返回值

计算风格

### 也可以看看

* interface [ICSSStyleDeclaration](../../icssstyledeclaration/)
* class [Element](../../../aspose.html.dom/element/)
* interface [IViewCSS](../)
* 命名空间 [Aspose.Html.Dom.Css](../../iviewcss/)
* 部件 [Aspose.HTML](../../../)

---

## GetComputedStyle(Element, string) {#getcomputedstyle_1}

此方法用于获取在 CSS2. 中定义的计算样式

```csharp
public ICSSStyleDeclaration GetComputedStyle(Element element, string pseudoElement)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| element | Element | 要计算其样式的元素。此参数不能为空。 |
| pseudoElement | String | 伪元素。 |

### 返回值

计算风格

### 也可以看看

* interface [ICSSStyleDeclaration](../../icssstyledeclaration/)
* class [Element](../../../aspose.html.dom/element/)
* interface [IViewCSS](../)
* 命名空间 [Aspose.Html.Dom.Css](../../iviewcss/)
* 部件 [Aspose.HTML](../../../)


