Element.get_style_property#

Element.get_style_property(property, default=None)[source]#

Gets the value of a CSS property inside the style attribute.

Parameters:
  • property (str) – The name of the property

  • default (Any, default=None) – The value to return if the property does not exist or the style attribute does not exist.

Returns:

  • str – If the property exists.

  • None, Any – Retuns None if the property does not exist or the style attribute does not exist. However, if a default value is specified, it will be returned instead.