简体   繁体   English

文本溢出:省略号不适用于IE中的输入,但在其他语言中则可以正常工作

[英]text-overflow: ellipsis is not working for input in IE but working fine in other

I have an issue in MS IE ( ver. 11 ) for text-overflow: ellipsis; 我在MS IE (第11版 )中有一个text-overflow: ellipsis; property for input field, where it doesn't seem to work only for this particular browser (IE). input字段的“属性”,它似乎仅不适用于此特定浏览器(IE)。

Any suggestions would be helpful. 任何的意见都将会有帮助。

Fiddle: https://jsfiddle.net/TjGyz/362/ 小提琴: https : //jsfiddle.net/TjGyz/362/

 input, div { width: 100px; border: 1px solid silver; padding: 5px; margin-bottom: 10px; outline: none; font: 20px sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } 
 <input type="text" value="This element is an input" /> 

<input type="text" value="This element is an input" readonly/>

https://jsfiddle.net/kvuvkzeL/ https://jsfiddle.net/kvuvkzeL/

Make it editable : 使其可编辑:

    $( '.INPUT_CLASS' ).on( 'click', function() {
        $( this ).prop( 'readonly', '' );
        $( this ).focus();
    })

    $( '.INPUT_CLASS' ).on( 'blur', function() {
        $( this ).prop( 'readonly', 'readonly' );
    })

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 文字溢出:省略号无法使用 <td> IE9 - text-overflow: ellipsis not working in <td> IE9 CSS jQuery文本溢出省略号不起作用 - css jquery text-overflow ellipsis not working 文字溢出无效 - Text-overflow is not working 文本溢出:省略号 css 属性在 firefox 中不起作用,stackoverflow 上的上一个解决方案也不起作用 - text-overflow:ellipsis css property not working in firefox, prev solution on stackoverflow is also not working jquery tablesorter不在输入/选择字段(IE8)上工作,在IE8中的所有其他文本字段上工作正常 - jquery tablesorter not working on input/select fields (IE8), works fine on all other text fields in IE8 如何在使用文本溢出时获取删除的文本:省略号 - How to get the removed text when using text-overflow: ellipsis 需要使文本更短(文本溢出有问题:省略号) - Need to make shorter text (Having problems with text-overflow: ellipsis) 在移动设备中,空白:nowrap; 溢出:隐藏 文字溢出:省略号; 有点不起作用 - in mobile devices, white-space:nowrap; overflow:hidden; text-overflow:ellipsis; kinda do not work 有没有办法知道在 text-overflow:ellipsis 和 overflow:hidden 应用后有多少字符被保留或可见? - Is there any way to know how many characters are retained or visible after text-overflow:ellipsis and overflow:hidden is applied? jplayer不在ie8工作但在其他浏览器中没问题 - jplayer not working in ie8 but is fine in other browsers
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM