Home >Web Front-end >HTML Tutorial >表格内容控制(换行、不换行、隐藏)_html/css_WEB-ITnose

表格内容控制(换行、不换行、隐藏)_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:31:121659browse

   .table th, .table td        {       word-wrap: break-word; //字母自动换行            word-break: break-all; //允许在单词内换行       white-space:pre-wrap;  // 只对中文起作用,强制换行        white-space:nowrap; //强制不换行,都起作用        white-space:nowrap; overflow:hidden; text-overflow:ellipsis;//不换行,超出部分隐藏且以省略号形式出现        }table{   table-layout: fixed;//固定宽度,表格宽度固定}

 

Statement:
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