【问题标题】:Kendo Mobile Widget Button Group Wrap to width -> newlineKendo Mobile Widget Button Group Wrap to width -> newline
【发布时间】:2014-04-15 14:32:17
【问题描述】:

我有一个使用 kendo 移动小部件制作的很长的按钮组,但它离开了屏幕。它必须在 iPad 上运行。

有没有办法在屏幕太长时创建换行符?

我已经尝试过自动换行:break-word 和 max width 但似乎没有任何效果

<ul id="buttonGrp" data-role="buttongroup"></ul>

var a = 97;

for (var i = 0; i < 26; i++)
{
      $("<li class='km-button'>" + String.fromCharCode(a + i) + </li>").appendTo("#buttonGrp ");
}

【问题讨论】:

    标签: javascript css kendo-mobile buttongroup


    【解决方案1】:

    我想我找到了解决办法

    #buttonGrp li
    {
        float:left;
    }
    

    【讨论】:

      【解决方案2】:

      在旧的 android 设备上,此解决方案不起作用。 试试这个。

      #selectList {
          display: block;
          float: left;
          white-space: normal !important;
      }
      
      #selectList li {
          float: left;
          border-width: 1px;
          margin: 1px;
          display: block;
          white-space: normal !important;
      
      }
      

      【讨论】:

        猜你喜欢
        • 2022-12-27
        • 2013-04-05
        • 1970-01-01
        • 1970-01-01
        • 2022-12-27
        • 1970-01-01
        • 2014-05-30
        • 1970-01-01
        • 2021-10-03
        相关资源
        最近更新 更多