In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to set the excess part of html not to show, it has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Html sets the excess part of the method: 1, by setting "width:10em;" to ensure that the text will not be truncated by semi-Chinese characters; 2, by setting "overflow: hidden;" to hide the text beyond the length; 3, through "text-overflow:ellipsis;" to set ellipsis.
This article operating environment: windows7 system, HTML5&&CSS3 version, Dell G3 computer.
How does html set the excess part not to be displayed?
HTML settings beyond partial hiding
Title div {width: 10eme; / * ensure that the text will not be truncated by semi-Chinese characters, showing 10 characters * / overflow: hidden; / * text hiding beyond the length * / text-overflow:ellipsis;/* text hidden after adding an ellipsis * / white-space: nowrap / * forcing no line wrapping * /} text exceeds the need to hide and show ellipses, which is often used at work. I think many people have encountered it. There are two solutions to this: Title div {width: 10em; / * ensure that the text will not be truncated by semi-Chinese characters, showing 10 characters * / overflow: hidden / * the ellipsis appears * / text-overflow: ellipsis; / * in which line * /-webkit-line-clamp: 2; display:-webkit-box;-webkit-box-orient: vertical } text exceeds the need to hide and show ellipses, which is often used at work. I think many people have encountered it. There are two solutions to this: Title div {width: 10em; / * ensure that the text will not be truncated by semi-Chinese characters, showing 10 characters * / overflow: hidden / * text hiding beyond length * / text-overflow:ellipsis;/* text hiding followed by an ellipsis * / white-space: nowrap / * forcing no line wrapping * /} text exceeds the need to hide and show ellipses, which is often used at work. I think many people have encountered it. There are two solutions to thank you for reading this article carefully. I hope the article "how to set the excess part of html not to show" shared by the editor is helpful to you. At the same time, I hope you will support it. Pay attention to the industry information channel, more related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.