I have a dynamic list of elements.
I do not want this list to be too long.
I could use:
ul {
columns: 2;
-webkit-columns: 2;
-moz-columns: 2;
}
But this always results in two columns. I would prefer to only have one column if there are only a few elements in the list.
So with 5 elements or less, I want this:
1
2
3
4
5
But with 6 or more elements I want this:
1 4
2 5
3 6
I use css3, html, bootstrap 2.3.2 and jquery
Do anyone have some tips for the best way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…