Thuộc tính bottom khi dùng position relative trong CSS

Thuộc tính bottom khi dùng position relative trong CSS

Thuộc tính bottom khi dùng position relative trong CSS

Tự code rồi chạy thử... Chạy Thử
<!DOCTYPE html>
<html>
<head>
<title>Thuộc tính bottom khi dùng position relative trong CSS</title>
<style>
#divtong{width:100%; height:300px; background:red;}
#divtong p{margin:0px; padding:0px; width:100px; height:30px; background:green; left:10px; z-index:1; line-height:30px; text-align:center; color:#fff}
</style>
</head>
<body>

<h1>Thuộc tính bottom khi dùng position relative trong CSS</h1>

<p>Thuộc tính bottom trong position relative sẽ canh cạnh dưới của phần tử HTML so với vị trí ban đầu của nó:</p>

<div id="divtong">

    <p style="bottom: 0px; position:relative;" >bottom: 0px;</p>
    <p style="bottom: -10px; position:relative;" >bottom: -10px;</p>
    
</div>

</body>
</html>
Thuộc tính bottom khi dùng position relative trong CSS nằm trong bài viết Thuộc tính bottom trong CSS