css将宽度100%分为3列 [英] css divide width 100% to 3 column
本文介绍了css将宽度100%分为3列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有3列的布局。
我有100%除以3。
结果显然是33.333 ....
我的目标完美屏幕1/3 。
问题:
CSS后可以处理多少个点以指定宽度的1/3?
例如。 33.33333
(n = 5)
< - 多少 n
can css handle
HTML:
< div id = 包装 >
< div id =c1>< / div>
< div id =c2>< / div>
< div id =c3>< / div>
< / div>
CSS:
#c1,#c2,#c3 {
width:33%; // 100%
1/3}
如果您知道更好的分割方式3,然后我打开你的建议:)
解决方案
我认为完美的1/3可能存在于CSS中。我个人会这样做:
$ b
#c1,#c2 {
width:33% ; // 100%
的三分之一}
#c3 {
width:auto;
//或宽度:34%;
}
I have layout where I have 3 columns. There for I divide 100% by 3.
The result is obviously 33.333....
My goal is perfect 1/3 of screen.
Question:
How many numbers after dot can CSS handle to specify 1/3 of width ?
e.g. 33.33333
(n=5)
<-- how many n
can css handle
HTML:
<div id="wrapper">
<div id="c1"></div>
<div id="c2"></div>
<div id="c3"></div>
</div>
CSS:
#c1, #c2, #c3 {
width: 33%; // 1/3 of 100%
}
If you know better way to divide by 3 then I am open to your suggestions :)
解决方案
I don't think a perfect 1/3 could exist in CSS. I personally would do
#c1, #c2 {
width: 33%; // 1/3 of 100%
}
#c3 {
width: auto;
//or width:34%;
}
这篇关于css将宽度100%分为3列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文