[英]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.