The true meaning of margin-left:-100%

magin-left:-100%

This percentage is the percentage of the content length of the parent element , and the content length of the parent element needs to remove the padding magin border. Since the length is set to 100%, a full line of width compensation margin is required, so move to the far left.

magin-right:-150px

Negative value of margin will change the space occupied by the element, and move to the far right of the parent element, and the width of the child element is 150px

Guess you like

Origin blog.csdn.net/m0_60237095/article/details/129496219