【问题标题】:Bootstrap-treeview overflow indentationBootstrap-treeview 溢出缩进
【发布时间】:2018-03-05 08:24:26
【问题描述】:

我有一个引导树视图,其中文本太长而无法放在一行中。 文本确实流到下一行,但是缩进仅适用于第一行,而不适用于第二行。 查看Current situation的截图

我要达到的是下一张截图some paint job

有人知道如何达到这个目标吗?

【问题讨论】:

    标签: bootstrap-treeview


    【解决方案1】:

    我已将“li”元素内的文本包装到包含类节点标签的 span 元素中,然后 css 将完成这项工作:

        
        /*
            Align text in the consequent lines as well
        */
        .node-label {
            display: flex;
        }
        .node-tree > [class="icon glyphicon"] {
            display: none !important;
        }
        .list-group-item {
            display: flex !important;
        }
    

    这是一个关于如何构建列表的示例

    <li class="list-group-item node-tree" data-nodeid="13" style="color:undefined;background-color:undefined;">
    <span class="indent"></span>
    <span class="indent"></span>
    <span class="icon glyphicon"></span>
    <span class="icon node-icon"></span>
    <span class="node-label">Graduate Programs With Rotations</span>
    </li>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-11-18
      • 2020-09-05
      • 2018-10-01
      • 2021-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多