How can I show dots (“…”) in a span with hidden overflow?

后端 未结 8 1356

My CSS:

#content_right_head span
{
  display:inline-block;
  width:180px;
  overflow:hidden !important;
}

Now it\'s showi

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 04:21

    I think you are looking for text-overflow: ellipsis in combination with white-space: nowrap

    See some more details here

提交回复
热议问题