Strange special characters issue in left side ellipsis

前端 未结 2 1333
甜味超标
甜味超标 2021-01-22 06:53

I have some file path, to which I am trying to show ellipsis on left side using the below code.

2条回答
  •  情歌与酒
    2021-01-22 07:23

    ellipsis on the right side

    ellipsis on the right side with overflow: hidden and text-overflow: ellipsis:

    .ellipsis {
        display: inline-block;
        width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border: 1px solid black;
    }
    

    http://plnkr.co/edit/LYx2LPumbMZkIDp7no2m?p=preview

    Related issues:

    • https://code.google.com/p/chromium/issues/detail?id=155836
    • https://code.google.com/p/chromium/issues/detail?id=171659

    ellipsis on the left side.

    see also:

    • Text-overflow ellipsis on left side
    • Needs use right "text-overflow" when "direction" is set to "rtl"
    • http://davidwalsh.name/rtl-punctuation
    • http://www.w3schools.com/tags/tag_bdi.asp

    is used for that intent but is not supported on all browsers.

    C:\Program Files\Java\jre7\bin\new_plugin\npdeployjava1.dll////
    

    http://plnkr.co/edit/zLPRCQ2ggTAclf7XaQsM?p=preview

    special characters not showing with direction: rtl?

    They are showing... remove overflow: hidden to convince yourself; but they are showing somewhere unexpected depending on browser implementation. One solution; which isn't working across all browsers; is to use the tag.

提交回复
热议问题