Get the App
SLTechnology News&Howtos  ›  Development  › 

How to change the long part of td into an ellipsis display

Shulou Source: shulou.com Published: 2022-06-03 08:13:20 10月04日 Update

This article introduces the knowledge of "how to turn the long part of td into ellipsis display". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

First set the style of the table table-layout: "fixed" and then set the width of the table (this step must)

Finally, set the three necessary properties of the td style

The code is as follows:

Text-overflow: ellipsis

White-space: nowrap

Overflow: hidden

This is the end of the content of "how to turn too long Chinese characters into ellipsis display in td". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Text ellipsis part content more style knowledge table practical necessary learned next three code dilemma actual width attribute situation article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Information Shulou Technology Huawei Microsoft