1. Select the positioning mode to control the position of elements with special positions

1.1 Adding positioning attributes to an Image Position: Absolute Absolute positioning

Absolute position the origin is the upper-left corner of the screen by default. Usually, the origin of an absolutely positioned element is positioned to the upper-left corner of its parent. Add position:relative to its parentCopy the code