ComputedStyleDeclaration
ComputedStyleDeclaration
概述
ComputedStyleDeclaration 是 Aspose.Html FOSS 为 Python 提供的类。
元素的只读已解析样式声明。
此类提供 3 种方法,用于在 Python 程序中处理 ComputedStyleDeclaration 对象。可用的方法包括:__init__、get_property_value、item。安装 Aspose.Html FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:length。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
length | int | 读取 | 已解析属性的数量。 |
方法
| 签名 | 描述 |
|---|---|
__init__(properties: dict[str, str]) | Calls init(properties) 在此 ComputedStyleDeclaration 实例上。 |
item(index: int) → `str | None` |
get_property_value(name: str) → str | 返回已解析的属性值;如果属性不存在,则返回 ''。 |