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

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

问题描述

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



我有一个动态选择列表,一些选项非常长。我想要太长的选项包装到下一行。除此之外,我想要缩进这些行。



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



这是我有的:

 我是一个短选项
这是一个非常真正很长的选项
这一个不太糟糕
但是看起来我多久了!我永远继续!

这里是我想要的:


$ b $我是一个简短的选项
这是一个真正的
真正的长选项
这一个是' t太糟糕了
但是看起来多久
我是!我永远继续!


解决方案

c>< option> ,您需要自行滚动或查找菜单插件


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.

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

Here's what I have:

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!

And here's what I'd like to have:

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天全站免登陆