【CSS】bottom - 要素の位置(下)
CSSのbottomプロパティをご紹介します。
bottom
bottomは要素の下端の位置を示すプロパティです。
基本構文
bottom: 値;
サンプル
<style>
.container {
position: relative;
padding: 15px;
background: lightgray;
}
.box {
height: 100px;
background: yellow;
}
p {
margin: 0;
position: absolute;
bottom: 0;
}
</style>
<div class="container">
<div class="box"></div>
<hr>
<p>TEXT</p>
<div class="box"></div>
</div>