html - 如何对齐项目中的项目
问题描述
我想要一个宽度为 100% 并且将其项目向右对齐的细节。
我试过了:
details {
display: flex;
flex-direction: column;
align-items: flex-end;
}
HTML:
<details>
<summary>example</summary>
<div>aaa</div>
<div>aaa</div>
<div>aaa</div>
<div>aaa</div>
</details>
问题是,这些项目是 100% 宽的,并且没有向右对齐。
解决方案
尝试使用justify-content:space-between
而不是align-item:flex-end
推荐阅读
- mysql - 如何使用 PHP 显示带有 MIN、MAX 和 AVG 值(变量 2)的 SQL SUM 查询结果(变量 1)?
- ssl - 将 SSL 证书添加到入口控制器与将其添加到入口资源
- java - 在java中重构两个相似的类
- python - zsh:命令不适用于 pip、conda、python
- rust - 与单一实现冲突的实现错误
- postgresql - postgres 未部署在 heroku 上
- python - 在循环python中重新定义变量
- blazor - 使用 Blazor 客户端 (WebAssembly) 调整图像大小
- python-3.x - 对numpy数组进行排序的有效方法
- stripe-payments - Laravel 7 Cashier 订阅:在 null 上调用成员函数 create()