选择列表中的自动换行选项 [英] Word wrap options in a select list

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

问题描述

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

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!

推荐答案

你不能用标准的来做到这一点,你需要自己动手或找到一个菜单插件

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

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

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