300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > plantuml最大宽度_设置TH最小和最大宽度非常缓慢

plantuml最大宽度_设置TH最小和最大宽度非常缓慢

时间:2023-10-11 23:22:37

相关推荐

plantuml最大宽度_设置TH最小和最大宽度非常缓慢

给定一个固定头HTML表,我试图排队标题列与正文行列。我这样做是因为我使用CSS来使头部固定,而头部与身体其他部分不一致。设置TH最小和最大宽度非常缓慢

我正在使用的JavaScript工程,但速度非常慢。关于我如何加快速度的任何想法?

下面是显示问题的小提琴。现在,相对较小的桌子需要5秒钟以上。 /w93NU/

这里是我使用的代码:

function fixedHeader($table) {

//This function compares the header row with the first body row and lines up all of the widths

var firstRowTds = $table.children("tbody:first").children("tr:first").children("td");

var headerRowThs = $table.find("th");

for (var i = 0; i < firstRowTds.length; i++) {

var head = headerRowThs[i];

var cell = firstRowTds[i];

var width = (Math.max($(cell).outerWidth(), $(head).outerWidth())) + "px";

//Here are my problem pieces. Setting these values are what kills the perfomanrce

$(cell).css({

"min-width": width,

"max-width": width

});

$(head).css({

"min-width": width,

"max-width": width

});

}

}

+0

请在下面看到我的新答案。 –

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。