AmpAttributes

AmpAttributes class

Represents attributes used by the amp-components.

public class AmpAttributes

Constructors

Name Description
AmpAttributes() The default constructor.

Properties

Name Description
Height { get; set; } Height of element.
Heigths { get; set; } The value of this attribute is a sizes expression based on media expressions.
IsFallback { get; set; } Define that current element is fallback.
IsNoloading { get; set; } The noloading attribute indicates whether the “loading indicator” should be turned off for this element.
IsPlaceHolder { get; set; } The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.
Layout { get; set; } AMP provides a set of layouts that specify how an AMP component behaves in the document layout.
Media { get; set; } The value of media is a media query. If the query does not match, the element is not rendered and its resources and potentially its child resources will not be fetched. If the browser window changes size or orientation, the media queries are re-evaluated and elements are hidden and shown based on the new results.
On { get; set; } The on attribute is used to install event handlers on elements.
Sizes { get; set; } The value of the AMP sizes attribute is a sizes expression that selects the defined size corresponding to the media query based on the current window size.
Width { get; set; } Width of element.

Methods

Name Description
virtual ToAmpHtml() Represents amp html version of attributes.
virtual ToHtml() Represents html version of attributes.

See Also