gpt4 book ai didi

html - 显示 : table doesn't respect width

转载 作者:行者123 更新时间:2023-11-28 06:38:57 26 4
gpt4 key购买 nike

我需要使用 display: table 使内容居中显示

这是我的代码:JSFIDDLE

我需要让“表格”适合所有屏幕。但是如果 centered 不仅仅是屏幕,表格会变得太大并且忘记 height: 100%。如何使表格和居中不超过屏幕,如果超过屏幕则添加滚动条?

最佳答案

这是因为您将 .container 的高度设置为 100px 而不是 100 %

你想让它垂直和水平居中吗?

关于html - 显示 : table doesn't respect width,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34449160/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com