CSS的HTML动态布局与不固定的列? [英] CSS for HTML dynamic layout with not fixed columns?
本文介绍了CSS的HTML动态布局与不固定的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想设置这样的布局,两个列都是动态的 - 一个是由第一列和最小宽度的内容设置。我发现很多解决方案,其中栏固定的宽度,但它没有解决这个问题。
I want to set such layout both columns are dynamic - one is set by content second by the first column and minimum width. I found many solution where column is fixed with width but it no solves this problem.
看到我想在屏幕上实现。
See what I want achieve on screen.
>
我应该使用什么CSS?
What CSS I should use?
推荐答案
有这样的东西有不同的方法...一个简单的方法是使用 display:table;
为 display:table-cell;
There are different approaches for stuff like this ... an easy way would be to use display: table;
for the container display: table-cell;
for the childs and width: 1px;
for the first child.
我为你做了一个小提琴:
I have made a fiddle for you:
这篇关于CSS的HTML动态布局与不固定的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文