如何在显示后恢复正常:无对表行 [英] how to revert back to normal after display:none for table row
问题描述
基本上,我有一个表。 Onload,我将表的每一行设置为 display:none
,因为我有很多javascript处理,我不想让用户看到它,而它是正在完成。我设置一个计时器显示它一段时间后,我的问题是,我不能得到表行显示像表行。如果我设置 display:block
,它将不会与标题(th)对齐。我发现的唯一的解决方案是 display:table-row
从css2,但是7和以下不支持这个声明。
Basically, I have a table. Onload, I set each row of the table to display:none
since I have a lot of javascript processing to be done and I don't want user to see it while it is being done. I've set a timer to display it after a little while, my problem is that i can't get the table row to display like a table row. If I set display:block
, it would just not line up with the headers (th). The only solution I've found is display: table-row
from css2, but ie 7 and below does not support this declaration.
任何解决方案?
推荐答案
这将允许该行使用其默认显示值,因此适用于所有浏览器
set display to an empty string - this will allow the row to use its default display value and so works in all browsers
这篇关于如何在显示后恢复正常:无对表行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!