Method ScrollElementIntoView
ScrollElementIntoView(ElementReference, string, string, string)
Scrolls the specified HTML element into view.
Declaration
Task ScrollElementIntoView(ElementReference elementRef, string behavior = "smooth", string block = "nearest", string inline = "nearest")
Parameters
Type | Name | Description |
---|---|---|
ElementReference | elementRef | A reference to the HTML element to scroll into view. |
string | behavior | Defines the transition animation. Can be 'auto' or 'smooth'. |
string | block | Defines vertical alignment. Can be 'start', 'center', 'end', or 'nearest'. |
string | inline | Defines horizontal alignment. Can be 'start', 'center', 'end', or 'nearest'. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |