table(二)table嵌套

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_38078822/article/details/82320582

table可以放在td中,用于实现table嵌套

   <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" 

style="border-collapse: collapse;border-collapse: collapse;border-width:0px; border-style:hidden;

table-layout:fixed;"></table>

属性中,table-layout是固定table中td的宽度,防止td变形

style="border-collapse: collapse;border-collapse: collapse;border-width:0px; border-style:hidden;此代码是为了防止table嵌套中border重叠问题

width:100%与height:100%===>是为了嵌套中的table能完美填充td内

cellpadding
  • pixels
  • %
规定单元边沿与其内容之间的空白。
cellspacing
  • pixels
  • %
规定单元格之间的空白。
border pixels 规定表格边框的宽度。

猜你喜欢

转载自blog.csdn.net/qq_38078822/article/details/82320582