选择列表中的包装选项 [英] Word wrap options in a select list

查看:85
本文介绍了选择列表中的包装选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在选择列表中包装长选项?

Is it possible to wrap long options within a select list?

我有一个动态选择列表,其中一些选项相当冗长。我想要太长的选项可以包装到下一行。除此之外,我想缩进这些行。

I have a dynamic select list, and some of the options are pretty lengthy. I'd like options that are too long to wrap to the next line. Beyond that, I'd like to indent those lines.

如果不可能,我的解决方案是将结果修剪到 n 字符。

My solution if this isn't possible is to just trim the result to n characters.

这是我有的:

I'm a short option
This is a really really really long option
This one isn't too bad
But whoa look how long I am! I go on forever!

这里是我想要的:

I'm a short option
This is a really really 
    really long option
This one isn't too bad
But whoa look how long 
    I am! I go on forever!


推荐答案

你不能用标准的< option> 您将需要自己滚动或找到一个菜单插件

you cant do this with a standard <option> you will need to roll-your-own or find a menu plugin

这篇关于选择列表中的包装选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆