In brief
The declaration creates a boundary for the visual content.
Useful to know
contain: paint tells the browser that descendants are drawn within the bounds of the element. Content that would go beyond them is cut according to the paint containment. [1] rules
This is a useful reason to check menus and decorative parts before adding containment to a map. A drop-down list that needs to go off the map may become invisible . contain has other types associated with size and arrangement; they are not interchangeable. Choose a specific constraint whose consequences correspond to the component.
Sources
For further detail and to check the information: