我有一个overflow:hidden的div overflow:hidden ,里面显示一个电话号码,用户键入它。 div内的文本与右对齐,随着文本向左增加,传入的字符被添加到右边。
但一旦文字大到不能适应div,数字的最后一个字符就会自动裁剪,用户看不到她输入的新字符。
我想做的是裁剪左边的字符,就像div显示最右边的内容,并且溢出到左边。 如何创建这个效果?
I have a div with overflow:hidden, inside which I show a phone number as the user types it. The text inside the div is aligned to right and incoming characters are added to right as the text grows to left.
But once the text is big enough not to fit in the div, last characters of the number is automatically cropped and the user cannot see the new characters she types.
What I want to do is crop the left characters, like the div is showing the rightmost of its content and overflowing to the left side. How can I create this effect?
最满意答案
您尝试使用以下方法:
direction: rtl;有关更多信息,请参阅 http://www.w3schools.com/cssref/pr_text_direction.asp
Have you tried using the following:
direction: rtl;For more information see http://www.w3schools.com/cssref/pr_text_direction.asp
更多推荐
div,字符,characters,left,电脑培训,计算机培训,IT培训"/> <meta name="descri
发布评论