【问题标题】:Options too long in Jquery's chosen with fixed widthJquery 中选择的选项太长,宽度固定
【发布时间】:2016-08-12 16:36:01
【问题描述】:

I have a chosen select with a fixed width, and it works as expected when an option is selected (the option's text gets cut and an ellipsis appears), but when I click the select field, the options listed are too long and他们需要几行。

有没有办法模仿所选选项的行为?也就是说,显示带有省略号的文本的选项列表。

【问题讨论】:

    标签: jquery jquery-chosen


    【解决方案1】:

    好的,我应该在询问之前进一步研究一下! 如果有人感兴趣,您可以覆盖一些样式,使您可以将选项保留在一行中,并在文本溢出的情况下使用省略号:

    .chosen-results .active-result{
        overflow:hidden;
        text-overflow:ellipsis;
        white-space: nowrap;
    }
    

    【讨论】:

      猜你喜欢
      • 2012-09-22
      • 2023-03-23
      • 1970-01-01
      • 2018-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多