html全屏显示auto100%,html - Display flex and auto height (100%) inside - Stack Overflow

作者尝试实现FlexGrid布局,希望所有列拥有相同的高度。布局在IE和Firefox中表现正常,但在Chrome和Opera浏览器中出现问题。寻求无需使用JavaScript解决跨浏览器兼容性的方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I'm trying to do flex grid but I want to make like any column have same height.

It work perfect for IE and Firefox, but in Chrome and Opera not.

/p>

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

min-height test

html, body { padding: 0px; margin: 0px; height: 100%; text-align: center; }

#test{ display: flex; border: 1px solid blue; list-style: none; padding: 0; margin: 0; }

#test li{display: inline-block; height: auto; border: 1px solid orange; font-size: 30px; padding: 50px;}

.blue{ background: blue; height: 100%; }

.red{background: red; height: 100%;}

.green{background: green; height: 100%;}

  • test
    test
  • test
    test
  • test
    test

It is possible to do without JS?

Anyone Can tell my where is my problem

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值