layer.style

Set or get CC style properties for the layer.

Next to the standard CSS property names you can also camelCase naming. For example, layer.style["border-color"] is the same as layer.style.borderColor. For a full list see this overview.
译:设置或获取CC层的样式属性。 旁边的标准也可以驼峰匹配的CSS属性名称命名。例如,layer.style["border-color"]是同layer.style.borderColor。 有关完整列表,请参阅本概述。

layerA = new Layer

# Modify a single style property 
layerA.style["outline"] = "1px solid red"

# Modify set of style properties 
layerA.style =
    "outline": "1px solid red",
    "padding": "10px"

# Get a specific style property 
print layerA.style["outline"]
# Output: "1px solid red"

results matching ""

    No results matching ""