【问题标题】:Container fluid on one side only容器流体仅在一侧
【发布时间】:2021-05-11 16:59:46
【问题描述】:

我在 uk-container 中有一个 2 列网格,我真正想要实现的是让第二列占据剩余的可用水平空间。使用 uikit 的最佳实践是什么?谢谢。

【问题讨论】:

  • 也许只是在第一列使用偏移量..

标签: uikit getuikit


【解决方案1】:

你应该看看uk-width-expand

【讨论】:

  • 你能稍微扩展你的答案吗(也许是一个小例子)?就目前而言,这个答案只不过是对原始问题的评论。
【解决方案2】:

您可以像下面这样使用 - 非常适合您:

<div class="uk-container" uk-grid>
<div class="uk-width-1-3">Fixed Width</div>
<div class="uk-width-expand">the rest of the horizontal space available</div>

或者如果你想根据内容生成宽度,你可以像下面这样使用:

<div class="uk-container" uk-grid>
<div class="uk-width-1-3">Fixed Width</div>
<div class="uk-width-auto">the rest of the horizontal space available</div>

注意:uk-width-auto 仅根据内容生成宽度。

【讨论】:

    猜你喜欢
    • 2012-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-17
    相关资源
    最近更新 更多