我有一个页面上的类别列表,每个类别都有一个嵌套的子类别列表。 类别列表项目样式以网格模式排列项目(通过display:inline; float:left ),其子类别以正常列表布局显示。 类别和子类别是用户配置的,但我不指望有数百个(可能不超过10个或20个子类别的3个或4个类别)。
我宁愿不为每个列表项目设置一个固定的大小。 我想围绕每个元素绘制边框,但是我不喜欢每个列表项大小基于其内容时的外观。 没有在列表项目上设置固定大小的解决方法吗?
I have a list of categories on a page, each with a nested list of subcategories. The category list item style arranges the items in a grid pattern (via display:inline; float:left), with the subcategories showing underneath in a normal list layout. The categories and subcategories are user configured, though I don't expect there to be hundreds (probably not more than 10 or 20 subcategories for each of 3 or 4 categories).
I would rather not set a fixed sized for each list item. I would like to draw a border around each element, but I don't like how it looks when each list item size is based on it's content. Is there a way around this without setting a fixed size on the list items?
最满意答案
你不能用CSS,你必须使用JavaScript。
You can't with css, you'd have to use javascript.
更多推荐
发布评论