Home > Web Front-end > CSS Tutorial > css force line break css css method to force no line break_Experience exchange

css force line break css css method to force no line break_Experience exchange

WBOY
Release: 2016-05-16 12:06:43
Original
1484 people have browsed it

I have previously summarized the css writing methods of Div line breaks and non-line breaks. But for table cells, we only know one attribute, nowrap, which can prevent it from wrapping.

I have had this need recently, but found that adding nowrap will still cause line breaks in some cases! Unfortunately, is there no way to force no line breaks?

After doing some Baidu, I was very pleased. I really found a way and the problem was solved.

Use CSS to realize automatic line wrapping or non-wrapping of table cell data

1. Automatic line wrapping:


[Ctrl A Select all Note:If you need to introduce external Js, you need to refresh to execute]


2. No line breaks:
Copy code The code is as follows:







No line break, no line break, no line break, no line break, no line break, no line break, no line break, no line break, no line break, no line break

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template