📅  最后修改于: 2023-12-03 15:02:28.340000             🧑  作者: Mango
The justify-content: flex-end
property in HTML is a part of the flexible box layout (flexbox), which allows you to align and distribute space among items inside a container.
When you set justify-content: flex-end
, the flex items are aligned to the end of the container from the main axis.
.container {
justify-content: flex-end;
}
Suppose you have three elements inside a container:
<div class="container">
<div class="item">Item 1</div>
<div class="item">Item 2</div>
<div class="item">Item 3</div>
</div>
You can use the justify-content: flex-end
property to align them to the end of the container:
.container {
display: flex;
justify-content: flex-end;
}
The justify-content: flex-end
property in HTML allows you to align and distribute space among items inside a container. By setting this property, you can align the flex items to the end of the container from the main axis.