为什么visible =“false”不适用于一个普通的html表?

前端之家收集整理的这篇文章主要介绍了为什么visible =“false”不适用于一个普通的html表?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
html表的可见属性不起作用.

为什么他们有这个财产有缺陷?我不得不使用style =“visibility:hidden”来隐藏表.

请解释为什么我很好奇

这是我正在使用的代码.意图是将桌子整体隐藏起来,但它不会隐藏桌子或其中的控件

  1. <table visible="false">
  2. <tr>
  3. <td >
  4. <label>Pick the color for action needed and paste it on textBox</label>
  5. </td>
  6. <td>
  7. <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  8. </td>
  9. <td>
  10. <asp:Button ID="Button1" runat="server" Text="Apply color" />
  11. </td>
  12. </tr>
  13. </table>

解决方法

使用display:none代替.此外,这可能是您需要的,因为这也会通过删除表占用的空间来截断页面,而可见性:隐藏会留下表空间.

猜你在找的HTML相关文章