如何使所有三个部分的高度相同? [英] how to make the height of all three sections same?
本文介绍了如何使所有三个部分的高度相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我附上了这个问题的萤幕撷取画面。有三列,我想保持所有三列的高度完全相同。我设法保持宽度相同的宽度css属性现在我想调整到高度。任何人都可以帮助我在这方面。先感谢。
I've attached a screenshot with this question. There are three columns and I want to keep the height of all the three columns exactly same. I managed to keep the width same with width css property now i wanted to adjust to height. Can anyone help me out in this regard. Thanks in advance.
推荐答案
我将使用下面的CSS来实现这一点:
I would use the following CSS to achieve this:
.wrapper {
display: table;
table-layout: fixed;
width: 100%;
}
.column {
display: table-cell;
}
使用 table-layout:fixed
你告诉每个子元素 display:table-cell
具有相同的宽度,基于包装器的宽度,以及等于高度均匀分布。
With table-layout: fixed
you're telling every child elements with display: table-cell
to have same width, equally distributed based on wrapper's width, as well equal height.
这篇关于如何使所有三个部分的高度相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文