Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 如何在固定布局表中创建可变宽度?_Jquery_Html_Css - Fatal编程技术网

Jquery 如何在固定布局表中创建可变宽度?

Jquery 如何在固定布局表中创建可变宽度?,jquery,html,css,Jquery,Html,Css,我有一个包含三个单元格的表 第一个的宽度应取决于内容 第二个的宽度应该永远固定 第三个的宽度应填满剩余的空间 注1:我的网站是响应性的;第三个的宽度应在不同的屏幕中更改 注2:为了防止第三方的内容外泄,我应该使用表格布局:固定和宽度:100%用于我的表格。此外,我还需要使用wordwrap:break-word用于s。关键是我不想使用单词break:breakall而不是自动换行。(因为它打破了中间的代码 ) 以下是我的尝试: +-+---+------------------------

我有一个包含三个
单元格的表

  • 第一个
    的宽度应取决于内容
  • 第二个
    的宽度应该永远固定
  • 第三个
    的宽度应填满剩余的空间
注1:我的网站是响应性的;第三个
的宽度应在不同的屏幕中更改

注2:为了防止第三方
的内容外泄,我应该使用
表格布局:固定和<代码>宽度:100%用于我的表格。此外,我还需要使用
wordwrap:break-word用于
s。关键是我不想使用
单词break:breakall而不是
自动换行
。(因为它打破了中间的代码<代码> <代码>)


以下是我的尝试:

+-+---+-------------------------------------------------------+
|4|fix|this is a test...!                                     |
+-+---+-------------------------------------------------------+
HTML:

还有一把小提琴


我想要的是这样的:

示例1:

+-+---+-------------------------------------------------------+
|4|fix|this is a test...!                                     |
+-+---+-------------------------------------------------------+
示例2:

+----+---+----------------------------------------------------+
|2   |fix|this is a test...!                                  |
+----+---+----------------------------------------------------+
|    |fix|this has not any first <td>...!                     |
+----+---+----------------------------------------------------+
|1234|fix|this has not any first <td>...!                     |
+----+---+----------------------------------------------------+
+---+---------------------------------------------------------+
|fix|this has not any first <td>.. then remove VN cell!       |
+---+---------------------------------------------------------+
|fix|this has not any first <td>.. then remove VN cell!       |
+---+---------------------------------------------------------+
示例4:

+---+---+-----------------------------------------------------+
|123|fix|the width of number of vote up cell should be        |
|   |   |changeable and it should be noted that this cell is  |
|   |   |break-word.                                          |
+---+---+-----------------------------------------------------+
+---+---+-----------------------------------------------------+
|123|fix|It is a integrated testtttttttttttttttttttttttttttttt|
|   |   |ttttttttttttttttttttttttttttttttttttttttttttttttttttt|
|   |   |tttttttttttttttttttttttttttttttttttttttt             |
+---+---+-----------------------------------------------------+
示例5:

+----+---+----------------------------------------------------+
|2   |fix|this is a test...!                                  |
+----+---+----------------------------------------------------+
|    |fix|this has not any first <td>...!                     |
+----+---+----------------------------------------------------+
|1234|fix|this has not any first <td>...!                     |
+----+---+----------------------------------------------------+
+---+---------------------------------------------------------+
|fix|this has not any first <td>.. then remove VN cell!       |
+---+---------------------------------------------------------+
|fix|this has not any first <td>.. then remove VN cell!       |
+---+---------------------------------------------------------+
+---+---------------------------------------------------------+
|修正|这没有任何先例。。然后移除VN单元|
+---+---------------------------------------------------------+
|修正|这没有任何先例。。然后移除VN单元|
+---+---------------------------------------------------------+

我需要使用JavaScript来实现我需要的吗?

试试这个属性:

空白:前置行


有更多具有不同行为的值

在单元格中使用段落,并为it@Elyor你的意思是