Elements with the following positions: Absolute Located at the specified coordinates relative to the upper left corner of the screen.
You can use the two values top and left em> together with the position attribute to move an HTML element to any position within the HTML document.
<html> <head> </head> <body> <div style = "position:absolute; left:80px; top:20px; background-color:yellow;"> This div has absolute positioning. </div> </body> </html>
The above is the detailed content of Absolute positioning using CSS. For more information, please follow other related articles on the PHP Chinese website!