Though text-overflow: ellipsis in css works properly in div, spans and etc it does not work properly in HTML select. Only the text overflow will be hidden from the select. But not ends with dots as the default behavior of text-overflow
虽然文本溢出:css中的省略号在div,spans等中正常工作,但它在HTML select中无法正常工作。只有文本溢出才会从选择中隐藏。但不是以点作为文本溢出的默认行为结束
Can anyone suggest any workarounds for this please ?
有人可以为此建议任何解决方法吗?
JsFiddle Exampleenter code here
这里是JsFiddle Exampleenter代码
1 个解决方案
#1
-2
Add
加
select, select option {
instead of
代替
select
in your css
在你的CSS
You had given style to only the select tag header and not the option tag
您只为select标签标题而不是选项标签提供了样式
#1
-2
Add
加
select, select option {
instead of
代替
select
in your css
在你的CSS
You had given style to only the select tag header and not the option tag
您只为select标签标题而不是选项标签提供了样式