What is content overflow? In fact, when there is a lot of text, if the content area is only that long, then the extra part will be replaced by dots. The case we are doing this time is in a table. We know that when we enter too much text content in a table, the table will be messed up, for example, a line will be displayed too long or automatically wrapped. But sometimes we just want to display it in a row of fixed width, and if there is any extra part, we can replace it with dots, so as not to clutter the table. So what to do? Generally we will use the following attributes CSS CodeCopy content to clipboard
CSS CodeCopy content to clipboard
First of all, the second style is specifically added to the table tag. If you want to achieve content overflow, the table must have a fixed width and height, and the tr and td inside the table must also have a fixed width and height. Before using content overflow, add the table-fix class to the table. Then check if your tr and td have a width. If not, it is best to give one. It can be fixed or in percentage. I mainly give percentages. The outer table has a fixed width, and the tr and td inside have a percentage width. This way, you can use the content overflow style. Finally, if there is a lot of content in a grid and you want to implement dots, add a .txt-ell class to this grid. The above article about the content overflow layout method in the table is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. Original URL: http://www.cnblogs.com/hanyining/archive/2016/05/25/5527668.html |
<<: CSS3 creates 3D cube loading effects
>>: Detailed explanation of Vue3's responsive principle
The usage format of the mysqladmin tool is: mysql...
This article shares the installation and configur...
Table of contents Preface 【undo log】 【redo log】 【...
This article describes how to set the automatic c...
Steps to configure whitelist access in mysql 1. L...
Exploiting a newly discovered sudo vulnerability ...
Introduction to Swap Swap (i.e. swap partition) i...
Table of contents for loop While Loop do-while lo...
Table of contents Background 1. What is dns-prefe...
Preface MySQL is a relational database with stron...
This article example shares the specific code of ...
Before configuration, we need to do the following...
Table of contents 1. Check the current status of ...
Table of contents What is MVCC MVCC Implementatio...
[LeetCode] 185. Department Top Three Salaries The...