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

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

Thuộc tính bottom khi dùng position absolute 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 absolute trong CSS</title>
<style>
#d-relative{width:100%; height:300px; background:red;}
span{width:100px; height:30px; background:green; right: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 absolute trong CSS</h1>

<p>Thuộc tính bottom trong position absolute sẽ canh cạnh dưới của phần tử HTML so với cạnh dưới của phần tử cha có position relative gần nhất:</p>

<div id="d-relative" style="position:relative">
	<span style="bottom:10px; position:absolute;">bottom:10px;</span>
    <span style="bottom:50%; position:absolute;">bottom:50%;</span>
</div>

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